if(isFromPushNotif) {
Bundle pushNotifBundle = getIntent().getExtras() ;
Log.i("SplashScreen"," before clear "+pushNotifBundle);
intent.putExtras(pushNotifBundle) ;
getIntent().getExtras().clear();
Log.i("SplashScreen"," after clear "+getIntent().getExtras()); //Here bundle is not cleared , log displays all the initial elements
}
startActivity(intent);
overridePendingTransition(0, 0);
finish();
答案 0 :(得分:0)
关于此处接受的答案Android. Can't clear or replace extras
使用onNewIntent而不是在Activity中使用onCrete来解决此问题。
答案 1 :(得分:0)
清除您的bundle
getIntent().removeExtra("your_key_here_to_be_removed");