Issue
I have managed to get App Linking working for Android where it opens the app when opening the specified url.
I am opening the url https://fir-trial-66e3f.web.app/stripesub
However it asks me whether I want to use the app or google chrome to open the link, with the options "JUST ONCE" or "ALWAYS".
I want it to automatically open in the app the first time and to not ask the user.
I have tried following the instructions here (https://stackoverflow.com/a/34360396/10222449) by adding android:autoVerify="true"
and I have verified my website.
I did not need to upload the json file as it verified it automatically as I use the same google account as the firebase project owner.
However it still asks the same question.
I am using an Ionic app with Capacitor, however I don't think that is related to the issue.
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="fir-trial-66e3f.web.app"
android:pathPrefix="/stripesub" />
</intent-filter>
Resources I used: https://developer.android.com/studio/write/app-link-indexing https://developer.android.com/training/app-links/index.html
Solution
Even though it auto verified me at search.google.com I still needed to generate the json file from within Android studio and copy to: myurl/.well-known/assetlinks.json.
To do this go to Android Studio -> Tools -> App Links Asssistant -> Step 3 Associate Website
I also needed to copy and paste it into notepad due to end of line issue (I think) and I put a carriage return at the end of the json or it wasn't working.
See: https://stackoverflow.com/a/44549183/669586
Answered By - MadMac
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.