Different behaviors in Open in App from browsers and other applications to my webView app

我与影子孤独终老i 提交于 2020-06-01 06:20:27

问题


Different behaviors detected:

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 browser detects link from example.com/place and goes to example.com/place as expected.

Firefox browser don't ask for "open in app" on example.com link, uses Firefox browser.

Instagram app don't ask for "open in app" on example.com link, uses Instagram webview browser.

Any ideas how to fix this? Does Whats App modify 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>

When I try to debug this situation, Chrome launches my app and debugger stops on "loadUrl" method on breakpoint as expected. WhatsApp don't stop on breakpoint like if just open other app without any url associated.


回答1:


Setting

<activity ... android:launchMode="singleTask">

Solve the whatsapp isue.



来源:https://stackoverflow.com/questions/62038818/different-behaviors-in-open-in-app-from-browsers-and-other-applications-to-my-we

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!