Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NPE su master/flow ( I cannot pass with Bundle/ getParceable the communication betweenActivity/Fragm  RSS feed

 
Giovanni Montano
Ranch Hand
Posts: 388
6
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI in short

I pass an uri with this structure
FragA listview--> interface-->main activity--> detail Activity XXX--> Detail Fragment

it looks it goes well till the three XXX you see above

i take the Uri from the detail Activity (after I receive it from another activity) and I pass it to the Fragment Activity with arguments.putParceable identifying a unique Key and starting the FragmentDetail:



and in Detail Fragment called by the above snippet I have a NPE at the line String mUriString = mUri.toString(); because mUri is null!
on the bold text below this snippet!



the Uri I am passing is a CONTENT URI +ID ( from the DB )
if you need more code let me know please

 
Giovanni Montano
Ranch Hand
Posts: 388
6
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cannot use external libraries is for an assigment
EDIT RESOLVED
instead of Bundle arguments= new Bundle();
had to pass
Bundle arguments= getArguments();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!