How to prevent deep linking from mobile site in android?

前端 未结 1 1200
既然无缘
既然无缘 2021-01-27 06:23

I have added deep links to all of my activities like this.

          
                   


        
相关标签:
1条回答
  • 2021-01-27 07:23

    you need to check login status of the user in the entry point of your activities and show the login activity (or dialog) to them if they are not logged in.

    you must handle this yourself in your different activities. which re available through deep linking. just check the logged in status each time these activities open and direct to login activity or dialog in the case they need.

    if you dont want your browser to add your your application in the list of URI intent suggestions, just delete the "browsable" like below:

       <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT"/>
          <data
              android:host="www.example.com"
              android:path="/stores"
              android:scheme="https" />
          </intent-filter>
    
    0 讨论(0)
提交回复
热议问题