My application can open links by default using this:
<category android:name="android.intent.category.BROWSABLE" /> <data android:host="example.com" android:scheme="http" /> <data android:host="www.example.com" android:scheme="http" /> ....
Now I have a link in my application that I do not support (for now) . So what I'm doing at the same time, open it using an external browser. eg:
String requestURL = "www.example.com/unsupportedlink"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(requestURL)); mActivity.startActivity(i);
I expect it to be open in the browser, but if the user has chosen that all links will be opened by default by default ("Allways open" and not "Just Once"), the application is called again and again sends the link to the browser - it Causes an endless loop. How can i avoid this?
android android-intent
Uriel Frankel
source share