This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Giovanni Montano
Ranch Hand
Posts: 252
4
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: 252
4
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