I start develop app for Android. I have some code write in Eclipse and I use attached emulator. When I send porgram to my emulator I get some error.
Debugger show in line super.onCreate(savedInstanceState);
// savedInstanceState = null
My code
public class PushAndroidActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
try
{
super.onCreate(savedInstanceState);
checkNotNull(SENDER_ID, "SENDER_ID");
Could you just try rotating your device - left ctrl F11. you will realize that the bundle is != null
onSaveInstanceState() will be called by default for a view if it has an id. The default implementation takes care of most of the UI per-instance state for you by calling onSaveInstanceState() on each view in the hierarchy that has an id. You could check these :
savedInstanceState is always null
When are ALL the cases when the onSaveInstanceState() method called?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.