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

Android Build a Self-Destructing Message Android App Capturing Photos and Videos Saving a Photo to the Gallery

Raghda Talaa't
Raghda Talaa't
2,944 Points

Photos not saved in the Gallery on my galaxy s3

When i tested the app on my device, photos are not showing in the Gallery but only in the Ribbit folder .. although when tested on the emulator it shows in the Gallery correctly.

What is the problem, is this because some devices behave differently for the onActivityResult method?

The code is exactly the same as the video.

Some picture gallery apps handle the contents differently. Maybe you can try fully closing the gallery app on your device before looking again.

1 Answer

Chris Wolchesky
Chris Wolchesky
12,025 Points

Does your Device run the same version of Android as your emulator? I can see version differences causing this. The best way to be sure though is to Debug your app from the phone itself and monitor the results of functions as they pass through. Danial Goodwin 's response regarding the gallery app itself needing to be restarted is great advice as well. You need to pin down if this is a permission issue type situation based on how/where you're saving your files or if it's just the gallery app not refreshing and showing your new files.