Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Susheel Chanda
Courses Plus Student 1,365 PointsSelf-destructing message android app
This is more of an observation than anything else. In the MainActivity.java class,
under the take picture case statement, we have:
Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); mediaUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
takePhotoIntent.putExtra(MediaStore.EXTRA_OUTPUT, mMediaUri); - (1) This above line with putExtra is supposed to put the filelocation in the intent so that it can be retrieved later using the onActivityResult method later. However, for case 0: i.e., 'take a pic' case I have always received only a null value for Intent parameter from the onActivityResult method.
I deleted line 1 and then used the (Intent data) parameter to retrieve the mMediaUri for the location, this problem is also mentioned in this stackoverflow post.