Hello. There is an intent-filter

  <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:host="myhost" android:pathPattern="/feed/.*" android:scheme="http" /> <data android:host="myhost" android:pathPattern="/feed/.*" android:scheme="https" /> <data android:host="myhost" android:pathPattern="/feed/.*" android:scheme="http" /> <data android:host="myhost" android:pathPattern="/feed/.*" android:scheme="https" /> </intent-filter> 

He catches diplinks, everything is fine, but it is required to run any links from inside the application bypassing intent-filter. Here is the standard code:

 val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) context.startActivity(browserIntent) 

It invokes the application selection window, but this list contains my application from which this intent was launched. How to remove it from there?

  • It seems that you can: stackoverflow.com/a/23268821/3212712 - Yuriy SPb
  • @YuriySPb, to my great regret, I find only this type of answers. They do not work, even if I send an empty array of intents to putExtra - then the browser will open with one MY application - Flippy
  • There below there is a suggestion to indicate a specific application for handling the content. If it works, then you can compile a list of possible applications from the system for processing and display them in your non-system dialog and launch a specific application in this way. - Yuriy SPb
  • @YuriySPb it’s strange that I didn’t google the solutions with the system chuser .. I thought intent-filter would have an external attribute but it wasn’t there - Flippy
  • Such are the cases) Not everything can be done through the system components, sometimes you have to cut your own) - YuriiSPb

0