在应用程序中打开从浏览器和其他应用程序到我的 webView 应用程序的不同行为
Different behaviors in Open in App from browsers and other applications to my webView app
检测到不同的行为:
WhatsApp app, ask for "open in app", but, when app selected leaves my app behind and just go to default page (or keep existing page if aplication is already open)
Chrome 浏览器从示例中检测到 link。com/place 并按预期转到示例。com/place。
Firefox 浏览器在 example.com link 上不要求 "open in app",使用 Firefox 浏览器。
Instagram 应用不在 example.com link 上请求 "open in app",使用 Instagram webview 浏览器。
有什么解决办法吗? Whats App 修改 link ?
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="@string/domain"
android:scheme="https"
android:pathPattern=".*" />
<data
android:host="@string/domain"
android:scheme="http"
android:pathPattern=".*" />
</intent-filter>
当我尝试调试这种情况时,Chrome 启动了我的应用程序,调试器按预期在断点的 "loadUrl" 方法上停止。
WhatsApp 不会在断点处停止,就像打开其他没有任何关联的应用程序一样。url。
设置
<activity ... android:launchMode="singleTask">
解决whatsapp问题。
检测到不同的行为:
WhatsApp app, ask for "open in app", but, when app selected leaves my app behind and just go to default page (or keep existing page if aplication is already open)
Chrome 浏览器从示例中检测到 link。com/place 并按预期转到示例。com/place。
Firefox 浏览器在 example.com link 上不要求 "open in app",使用 Firefox 浏览器。
Instagram 应用不在 example.com link 上请求 "open in app",使用 Instagram webview 浏览器。
有什么解决办法吗? Whats App 修改 link ?
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="@string/domain"
android:scheme="https"
android:pathPattern=".*" />
<data
android:host="@string/domain"
android:scheme="http"
android:pathPattern=".*" />
</intent-filter>
当我尝试调试这种情况时,Chrome 启动了我的应用程序,调试器按预期在断点的 "loadUrl" 方法上停止。 WhatsApp 不会在断点处停止,就像打开其他没有任何关联的应用程序一样。url。
设置
<activity ... android:launchMode="singleTask">
解决whatsapp问题。