0

Hey I want my website url to open my android when the user open this url in the browser What i did is

       <intent-filter>
            <data android:host="www.example.com" />
            <data android:scheme="https" />
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <category android:name="android.intent.category.DEFAULT"/>

        </intent-filter>

and my webiste url is www.example.com

but it doesn't work any way on how to achieve this Thanks

Antwan
  • 3,679
  • 7
  • 38
  • 61

3 Answers3

0

Try This:

Add data tag in <intent-filter> with host

<intent-filter>
                <data android:host="www.example.com" />
                <data android:scheme="https" />
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:scheme="http"
                      android:host="www.example.com" />
     </intent-filter>
Amy
  • 3,910
  • 1
  • 17
  • 33
0

You need to combine your <data> elements into one:

<data android:scheme="http" android:host="www.example.com" />
Karakuri
  • 36,506
  • 12
  • 75
  • 103
0

You can do it via href, example

<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>

Link: https://developer.chrome.com/multidevice/android/intents

Gaurav Dave
  • 5,038
  • 9
  • 21
  • 37
Ashish Rawat
  • 4,674
  • 1
  • 16
  • 16