Reputation: 245
How to make redirect my app without dialog (Choose Option) when user open custom url like this
I've tried to using intent filter in my android manifest like this
<intent-filter>
<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="signin.ebay.com" android:pathPattern="/ws/eBayISAPI.dll?/ThirdPartyAuthSuccessFailure&isAuthSuccessful=true*"/>
<data
android:scheme="http"
android:host="signin.ebay.com" android:pathPattern="/ws/eBayISAPI.dll?/ThirdPartyAuthSuccessFailure&isAuthSuccessful=true*"/>
</intent-filter>
but its not working , but when I've tried code like this
<intent-filter>
<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="signin.ebay.com" />
<data
android:scheme="http"
android:host="signin.ebay.com"/>
</intent-filter>
its working but it show dialog ChooseOption sometimes I open browser with url https://signin.ebay.com or http://signin.ebay.com
How to make when user open url this
they will redirect to my app WITHOUT dialog box ChooseOption , my tknexp is not static remember , thanks
Upvotes: 0
Views: 2558
Reputation: 6788
It is asking to choose option because you have given android:scheme="https"
. Because of this Android will look for applications , which supports android:scheme="https"
and will show user if there are multiple application taking care of thie scheme.
To Avoid it change the android:scheme="https"
to android:scheme="<your own scheme>"
which is handled by only you app. This will redirect directly to you application.
Now in your activities onCreate method you will receive the URL with instead of https://. But now you have total control on url , you can change it to https://
.
Upvotes: 1