1

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,837
  • 9
  • 41
  • 62

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
  • 4,034
  • 1
  • 20
  • 34
0

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

<data android:scheme="http" android:host="www.example.com" />
Karakuri
  • 38,365
  • 12
  • 84
  • 104
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
  • 6,838
  • 9
  • 25
  • 39
Ashish Rawat
  • 5,541
  • 1
  • 20
  • 17