作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
所以我正在制作移动应用程序,并希望使用相同的 URL 创建链接以激活 iOS 和 Android 中的内容。我已经知道该怎么做了。我对 android 的 Intent 是这样的:
<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="activity.action android:scheme="myapp"/>
</intent-filter>
我的问题是当我去测试这个并想在电子邮件中做一个超链接时 myapp://activity.action 在 android 上的 gmail 中不被识别为 url 并显示为纯文本。有没有办法来解决这个问题?我如何获得被 gmail 识别为链接的非标准架构?
最佳答案
自定义方案不受 gmail 和 chrome 应用程序支持。不要这样做。遵循从浏览器/链接打开应用程序的 android 指南。见以下帖子Make a link in the Android browser start up my app?
关于android - GMAIL 中非 HTTP 架构的超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26186235/
我是一名优秀的程序员,十分优秀!