I am trying to reload my activity and pass a bundle
, but I'm getting an empty (null) bundle.
Reload activity:
Intent intent = new Intent(MyActivity.this, MyActivity.class);
Bundle bundle = new Bundle();
bundle.putInt("key", 1);
intent.putExtras(bundle);
MyActivity.this.finish();
startActivity(intent);
onCreate
activity and I should get the bundle
:
@Override
public void onCreate(Bundle savedInstance)
{
if (savedInstance != null)
{
}
else
{
Log.i("d", "IS NULL !");
}
}
I'm getting null.