7

I have created an intent-filter that uses this:

<action android:name="android.intent.action.VIEW" />

and have registered a URL to open my app when clicked. This works as intended until I try and detect a link I do not support. Say I do some more processing in my main Activity, determine the link is not supported, and try to launch the web browser. This is what I am using:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(launchUrl));
activity.startActivity(browserIntent);

Now the problem here is this link is still registered to open my app. It essentially creates a routing loop where it continuously opens my app every time I try and launch to a browser. Is there a way to force open in a browser and not allow my app to intercept it a 2nd time?

icedwater
  • 4,701
  • 3
  • 35
  • 50

0 Answers0