Home > Blockchain >  prevent the app to be displayed in ( open as dialog ) for specific keywords in url using manifest in
prevent the app to be displayed in ( open as dialog ) for specific keywords in url using manifest in

Time:02-21

Right now in my manifest code I have

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter
        android:autoVerify="true"
        android:label="@string/app_name" >
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="https" />
        <data android:scheme="http" />
        <data
            android:name="default-url"
            android:host="@string/bc"
            android:scheme="@string/bc" />
    </intent-filter>

which allow the user to get open with dialog if he click on URL that start with domain of my application for example: pop-up dialog to select the app

and its working fine, however, I'm facing an issue when the user request forgets password he receives a link on his email to reset his password.

the link he received is like this: www.domain.com/forget_password/email.

what I want is to keep the app link working but if the domain contains /forget_password open the browser by default, not the application.

CodePudding user response:

Sorry, there is no "exclude" logic in <intent-filter>. You cannot create an <intent-filter> that says "I accept everything except this".

You will need to handle the forget_password path in your app, perhaps by launching a Web browser yourself.

  • Related