Skip to content Skip to sidebar Skip to footer

Empty Intent Extras In Onactivityresult

I have two activities. First calls second like this: Intent intent = new Intent(this, Second.class); startActivityForResult(intent, 1); returning data in second one: Intent intent

Solution 1:

I also ran into this and found the answer in the comments. To make it more discoverable for the next guy, let's restate as answer:

You must read the same data-type as you put in.

Solution 2:

Just call this lines before calling super.onFinish() or wherever you exit the previous activity

Intentintent= getIntent();
intent.putExtra("Date",dateSelected);
setResult(RESULT_OK, intent);

Post a Comment for "Empty Intent Extras In Onactivityresult"