Deep linking and multiple app instances

后端 未结 8 1221
庸人自扰
庸人自扰 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:33

    the accepted answer didn't work for me, here is what did:

    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    startActivity(intent);
    finish();
    

    from the official doc:

    If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.

提交回复
热议问题