问题描述
我的 AndroidManifest.xml
包含:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.broWSABLE" />
<data android:scheme="https" android:host="books.com" android:pathPrefix="/book" />
</intent-filter>
它在运行时用正确的页面打开我的应用
adb shell am start -a android.intent.action.VIEW -d "https://books.com/book/my-book-123" -c android.intent.category.broWSABLE
或
adb shell am start -a android.intent.action.VIEW -d "https://books.com/book/my-book-123" com.books.app
当我通过电子邮件或消息应用发送 https://books.com/book/my-book-123 时,它只会在我点击它时打开浏览器。
如果我删除 android:pathPrefix="/book"
它可以工作,但是每个网址都会打开应用程序,而我只想打开 books.com/books
网址
我已经在我的手机中检查过,books.com 没有为我的浏览器设置“始终打开”。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)