Android: Images saved by my app do not show in gallery -- even after reboot -


i create , save image in android app:

file dir = new file(environment.getexternalstoragedirectory(), ".myappname/saved"); file imagefile = new file(dir, "img" + random() + ".jpg"); fileoutputstream out = new fileoutputstream(imagefile); bi.compress(bitmap.compressformat.jpeg, 100, out); 

the images not show in gallery -- after reboots.

update: show part of code! corrected typos introduced when writing stackoverflow message. images save fine -- , can view them -- don't show in gallery. removed dot ".myappname" -- no gallery shows images. strange. below other apps save images in dot-folders , show in gallery :(

save file on sdcard/"some folde r" reflect in gallery,gallery app doesn't shows images private space. change below line of code

 file fwdir = new file(environment.getexternalstoragedirectory(), "myappname/saved"); 

edit :- removed . directory name. gonna hidden folder.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -