Reputation: 41
I have a need where I have to make all the URLs from chrome or any browser to open in my application. How can I do this in android?
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:path="/.*"/>
<data android:pathPattern="/Android" />
</intent-filter>
Currently I am using the above code in my project. This redirects all the links from other apps to my app. But not from Chrome.
Upvotes: 1
Views: 129
Reputation: 1007533
What you want is not possible. There is no requirement for a browser to necessarily pay attention to any other apps out there that might be interested in a URL. In particular, it seems that Chrome assumes that all http
/https
URLs are simply to be loaded as Web pages from the Internet. Other browsers may behave the same way.
Upvotes: 1