android - Flutter 上的 Http 链接在 Android 设备上不起作用
问题描述
在uni_links库的帮助下,我将浏览器中的支付屏幕与应用程序连接起来,以便在支付成功后链接回应用程序。这一切都在 iOS 上按预期工作,并使用返回 url 打开应用程序。但是在 Android 上甚至没有调用回调,它会通知我返回 url,即使应用程序已打开,这意味着 http 链接部分有效。
这是我在 Android Manifest 文件中添加的内容:
<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="www.redirect.mydomain.eu"
android:pathPrefix="/return_url"/>
</intent-filter>
这是我正在收听的来自 uni_links 的回调,以便它使用返回 url 字符串触发,但它根本不会在 Android 上触发:
_subscription = getLinksStream().listen((String link) {
// Handle success case
}, onError: (err) {
// Handle exception by warning the user their action did not succeed
});
知道为什么这根本不适用于Android吗?
解决方案
推荐阅读
- sql - 解决这个问题需要什么 SQL 查询?
- python - Python - 在字符串的不同部分查找子字符串
- ios - 在 ScrollView 中选择 TextField(打开键盘)时 - 内容使用键盘上下跳动
- c# - 异步方法不会将控制权返回给它的调用者
- javascript - 如何创建和打包 Web 组件库以在您自己的 Web ui 项目中使用
- c++ - 可变参数模板和省略号有什么区别?
- javascript - 即使firebase数据库中的数据顺序混乱,如何按时间获取数据顺序?
- python - 如何从熊猫数据框中提取索引值和元素值
- android - 从 sqlite 获取数据时编译时出现 sqlite 错误
- javascript - 将表数据复制到页面内的 javascript json 对象中