自定义的schema:// 的方式来打开app,在原生的android 和iOS都是支持的android
chrome上却没法打开。缘由是chrome禁掉了这种方式,chrome容许的方式是chrome
intent://#Intent;scheme=customed-schama;package=page-name;S.browser_fallback_url=http://xxx;end
附上国外一篇博文https://paul.kinlan.me/deep-app-linking-on-android-and-chrome/app
目前我尚未尝试行不行。看网上有人说这样也打不开,因而stackoverflow的大神说直接放弃自定义schema了。他的解决方法是直接用http加限定host:url
<receiver android:name=".DeepLinkReceiver"> <intent-filter > <data android:scheme="http" android:host="www.myapp.com" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </receiver>
http://stackoverflow.com/questions/27151806/deeplinking-mobile-browsers-to-native-app-issues-with-chrome-when-app-isnt-incode