Issue
Here is what I am passing. pictureFile
is a File
Intent intent = new Intent (context, ShowPicActivity.class);
intent.putExtra("picture", pictureFile);
In the next activity which one of the getters do I use to get it?
Intent intent = getIntent();
.....?
Solution
Try the following:
YourPictureClass picture = (YourPictureClass)getIntent().getExtras().get("picture");
By calling getExtras()
in your Intent
you get an instance of Bundle
.
With the normal get()
in class Bundle
you can read every Object
you pass to the calling Intent
. The only thing you have to do is to parse it back to the class
your object is an instance of.
Answered By - Obl Tobl
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.