Deep linking and multiple app instances

后端 未结 8 1224
庸人自扰
庸人自扰 2020-12-12 18:59

I have implemented deep linking in my app. I added this intent filter in my manifest file, and the deep linking is working.


    

        
相关标签:
8条回答
  • 2020-12-12 19:48

    You need to do following things for your Activity in your Manifest.

    android:launchMode="singleTask"
    

    This tells the system to always launch the existing instance of the Activity if it is already created.

    And you can handle the Intent then by overriding the method

    onNewIntent 
    

    See http://developer.android.com/guide/topics/manifest/activity-element.html for more information.

    0 讨论(0)
  • 2020-12-12 19:48

    Consider using finish() when leaving the deep link Activity, so if the deep link is operated again the activity will be recreated. This can avoid errors and contradictions.

    0 讨论(0)
提交回复
热议问题