简体   繁体   中英

redirect user from browser to android app

I have a simple webiste like this <a href="https://golderer.000webhostapp.com/">click</a>

I want to redirect the user from android chrome to my app

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="golderer.000webhostapp.com" />
    </intent-filter>

my app link: https://golderer.000webhostapp.com and it is verified on app links assistant. success your app is associated with the selected domains

it is working when links in email / note app, however, it does not redirect the user form the browser instead it opens the link in chrome

can I redirect the user from my website to the app? should I use fireabse dynamic links?

just make sure that you add.well-known/assetlinks.json to your website

from this link check if your the file is reachble https://developers.google.com/digital-asset-links/tools/generator

For Android 12 or above, read: https://developer.android.com/training/app-links/verify-site-associations#manual-verification

You might want to add the link to Verified links using the steps (Android 12):

  1. Goto phone settings,
  2. Search "Link"
  3. Choose Opening links
  4. locate your app
  5. Click add link
  6. Add your link that you need

Now try opening that link in a browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM