Android App Links服务器重定向至应用无法打开指定页面问题
邮箱验证流程中Android App Links唤起应用后无法打开指定页面的排查
问题场景
我的应用邮箱验证流程如下:
- 用户提交表单
- API发送包含确认链接的邮件
- 用户点击邮件内按钮,重定向至
server.my-domain.com完成邮箱验证 - 服务器随后重定向至
https://my-domain.com/account,预期已安装Android应用则唤起应用并打开account页面,未安装则打开网页链接
当前问题:应用能被正常唤起,但无法打开account页面;但从其他应用直接打开https://my-domain.com/account链接时,account页面可正常加载。
现有Android Intent配置
<intent-filter android:autoVerify="true"> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <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:scheme="my-scheme"/> </intent-filter> <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="http" /> <data android:scheme="https" /> <data android:host="*.my-domain.com"/> <data android:host="my-domain.com"/> </intent-filter>
已做排查
- 怀疑是Android App Links的重定向限制导致问题,考虑修改邮箱验证流程
- 基于React Native开发,使用
npx uri-scheme open https://my-domain.com/account -a测试,操作可正常打开account页面
内容的提问来源于stack exchange,提问作者Ilia
相关产品推荐
相关产品推荐

