Reputation: 16825
Passing extras between activities don't work. I tried all approaches I know.
Intent i = new Intent(getActivity(), SomethingMore.class);
i.putExtra(intentStart, 1);
i.putExtra(intentSomething, true);
startActivity(i);
and
Bundle extras = i.getExtras();
if (extras != null) {
start = extras.getInt(intentStart);
something = extras.getBoolean(intentSomething);
}
doesn't work. I also tried it with this methods to retreive
start = intent.getIntExtra(intentStart, 0);
something = intent.getBooleanExtra(intentSomething, false);
, which don't worked, too.
Using a Bundle
doesn't work as well ..
Intent i = new Intent(getActivity(), SomethingMore.class);
Bundle mBundle = new Bundle();
mBundle.putInt(intentStart, 1);
mBundle.putBoolean(intentSomething, true));
i.putExtras(mBundle);
startActivity(i);
Upvotes: 1
Views: 485
Reputation: 5146
Are the Intent Extra keys the same? ;) (intentSomething and intentStart)
Upvotes: 1