admin管理员组文章数量:1122846
I'm developing a Flutter app and trying to implement deep linking with dynamic links, setting my app as the default to open specific https links. Despite following various tutorials, the links still open in the browser instead of my app.
Here's what I've done so far:
- Updated the AndroidManifest.xml:
<activity
android:name=".MainActivity"
android:exported="true">
<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="mydomain"
android:pathPrefix="/path" />
</intent-filter>
</activity>
Created and hosted assetlinks.json at /.well-known/assetlinks.json with the correct SHA256 fingerprint.
Verified the assetlinks.json file is accessible via a browser.
Despite these steps, the links continue to open in the browser. I've also ensured that my app's settings are configured to handle the links and cleared defaults in the browser settings.
How can I ensure that dynamic links open directly in my Flutter app by default? Are there any additional configurations or steps I might be missing?
Any advice or suggestions would be greatly appreciated!
How can I ensure that dynamic links open directly in my Flutter app by default?
I'm developing a Flutter app and trying to implement deep linking with dynamic links, setting my app as the default to open specific https links. Despite following various tutorials, the links still open in the browser instead of my app.
Here's what I've done so far:
- Updated the AndroidManifest.xml:
<activity
android:name=".MainActivity"
android:exported="true">
<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="mydomain.com"
android:pathPrefix="/path" />
</intent-filter>
</activity>
Created and hosted assetlinks.json at https://example.com/.well-known/assetlinks.json with the correct SHA256 fingerprint.
Verified the assetlinks.json file is accessible via a browser.
Despite these steps, the links continue to open in the browser. I've also ensured that my app's settings are configured to handle the links and cleared defaults in the browser settings.
How can I ensure that dynamic links open directly in my Flutter app by default? Are there any additional configurations or steps I might be missing?
Any advice or suggestions would be greatly appreciated!
How can I ensure that dynamic links open directly in my Flutter app by default?
Share Improve this question asked yesterday Khunt JenishKhunt Jenish 295 bronze badges1 Answer
Reset to default 1If you're deploying to a custom App Distribution repository (e.g. Firebase) or directly to the device (instead of the Play Store), the auto-verify feature will not work, and you will have to configure your app to accept links manually.
Open App Info for your app, and tap on "Open by default". This setting should allow you to add your link.
Don't worry about having to ask your customers to do this -- if you've set everything up correctly, the auto-verify feature will add the custom link automatically once you publish your app to the Play Store.
NOTE: Firebase dynamic links have been deprecated in favour of App Links (Android) and Universal Links (iOS). I assume you are following the tutorial from https://docs.flutter.dev/cookbook/navigation/set-up-app-links. But if you are using dynamic links, you should migrate ASAP.
版权声明:本文标题:How to Set My Android App as the Default for HTTPS Links Using Flutter and Dynamic Links? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736283189a1926884.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论