Home > Net >  How to force the android system to open only my app based on the registered intent filter
How to force the android system to open only my app based on the registered intent filter

Time:02-10

Issue: I've been working on an app that listens to a certain kind of intents depending on a given link format. My intent filter works as expected, I'm just wondering whether it's possible to force the android system to bypass the kind of dialog below and open only my app. Intent Filter

CodePudding user response:

you force user to use a specific browser by this:

String packageName = "com.android.yourBrowser"; 
String className = "com.android.browser.YourBrowserActivity"; 
Intent internetIntent = new Intent(Intent.ACTION_VIEW);
internetIntent.addCategory(Intent.CATEGORY_LAUNCHER); 
internetIntent.setClassName(packageName, className); 

CodePudding user response:

I'm just wondering whether it's possible to force the android system to bypass the kind of dialog below and open only my app.

Do you own the domain of the URI that is being invoked? If so, than yes, with app links.

If not, then no.

  •  Tags:  
  • Related