2011-12-22 20 views
0

當我啓動twitter web視圖以便從我的活動中獲取twitter上的數據時,我遇到了保存一組action的問題。Bundle在onCreate方法爲null雖然我將它保存在onSaveInstanceState方法中,但在推送後的init post上

Akthi在twitter(web視圖)完成後,將捆綁數據保存在onSaveInstanceState中,該捆綁在創建調用者到tiwtter活動時爲null。

這裏是代碼:

CallerActivity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl))); 

@Override 
    protected void onSaveInstanceState(Bundle outState) { 
     super.onSaveInstanceState(outState); 
     outState.putString (Utils.CREATE_JSON_STRING_BUNDLE_KEY, mJsonString); 
     outState.putInt (UIhelper.UI_BASIC_TYPE_BUNDLE_KEY, mUiCurrentBasicType); 
    } 

回答

0

您可以嘗試把super.onSaveInstanceState()onSaveInstanceState函數結束並實現onRestoreInstanceState中,你得到你的數據備份

相關問題