我希望通过链接打开我的应用程序,
遵循Make a link in the Android browser start up my app?的指示.
好吧,它工作正常(大多数时候….这就是我寻求帮助的原因).
我的html链接是
Open Application
我的意图过滤器采用以下形式
到目前为止一切顺利(我希望).从浏览器的m-o-s-t正常工作.
为了测试以上内容,我编写了一个演示活动
final WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl("http://www.myhomepage.com/");
http://www.myhomepage.com/页面具有一些自定义链接/ href(包括
目的).
按常规链接可以打开带有这些链接的浏览器,但按我的“特殊
链接”(内部网)打开404页面
Web page not available
intent:#Intent;action=com.mark.MY_ACTION;end
might be temporarily down….
虽然黛安(Diane)在The above link中提到,
They allow you to direct the launch to only your app without the user having the option of instead going to the browser or any other app.
解决方法:
您的Intent筛选器与Diana提到的相同
android:label="@string/app_name">
所以你应该像:
未测试是否需要android.intent.category.VIEW.让我知道它是否有效.
标签:java,android
来源: https://codeday.me/bug/20191207/2087282.html