onNewIntent is not called

后端 未结 7 2113
暗喜
暗喜 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条回答
  •  萌比男神i
    2020-12-01 05:37

    The best way to handle onNewIntent with singleTop is simply this:

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
    }
    

    Then do all of your logic on getIntent inside onResume.

提交回复
热议问题