从浏览器和其他应用程序到我的webView应用程序,“在应用程序中打开"行为不同 [英] Different behaviors in Open in App from browsers and other applications to my webView app

查看:124
本文介绍了从浏览器和其他应用程序到我的webView应用程序,“在应用程序中打开"行为不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

检测到不同的行为

WhatsApp的应用程序,要求在应用开放",但是,当应用程序选择叶子我的应用程序背后,只是去到默认页面(或保留现有的页面,如果aplication已打开)

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浏览器检测到来自example.com/place的链接,并按预期方式转到example.com/place.

Chrome browser detects link from example.com/place and goes to example.com/place as expected.

Firefox浏览器在example.com链接上不要求在应用程序中打开",而是使用Firefox浏览器.

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

Instagram应用程序不要求example.com链接上的在应用程序中打开",而是使用Instagram Webview浏览器.

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

有什么办法解决此问题吗? Whats App会修改链接吗?

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>

当我尝试调试这种情况时,Chrome启动了我的应用程序,调试器按预期在断点处的"loadUrl"方法上停止. WhatsApp不会像在没有关联任何URL的情况下打开其他应用程序一样在断点处停止.

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.

推荐答案

设置

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

解决whatsapp问题.

Solve the whatsapp isue.

这篇关于从浏览器和其他应用程序到我的webView应用程序,“在应用程序中打开"行为不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆