【发布时间】:2017-11-13 19:57:59
【问题描述】:
我有一个奇怪的问题。调用 clear() 方法后如何无法清除 Bundle 这是我的代码:
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();
【问题讨论】:
-
发布捆绑包的值
here
标签: android android-fragments android-bundle