onNewIntent is not called

后端 未结 7 2137
暗喜
暗喜 2020-12-01 05:32

I have very strange situation.
Having one app, I decided to create another one from the code of first one.
I copied .xml files, copied .java files so that everythin

7条回答
  •  甜味超标
    2020-12-01 05:43

    The Activity you want to receive onNewIntent() in should have

    android:launchMode="singleTop"
    

    Or add the flag tn intent

    browserInt.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|
                        Intent.FLAG_ACTIVITY_SINGLE_TOP);
    

    As documented in onNewIntent(Intent)

提交回复
热议问题