vyn
vyn

Reputation: 25

Failure Delivering Results with HashMap between 2 activities

Background:

My Goal:

Problem:

java.lang.RunTimeException: Failure delivering results ResultInfo{who=null, request=1, 
result=0, data=Intent { (has extras) }} to activity.

I think I made a huge mistake but I couldn't solve it.


switch case from onOptionsItemSelected and onActivityResult are in the MainActivity:


onItemClick in the SubActivity with the ListView:


I hope someone can help me and thanks in advance.

Upvotes: 1

Views: 376

Answers (1)

C0D3LIC1OU5
C0D3LIC1OU5

Reputation: 8680

You should replace this line in your onActivityResult() method

 Intent intent = getIntent();

with this:

 Intent intent = data;

data is the name of a parameter you are passing in - that's where your extras reside. getIntent() call returns a null intent in this instance.

Upvotes: 1

Related Questions