• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Images taken with Camera app are not visible in Gallery app unless I restart phone

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I took the example tutorial from https://inducesmile.com/android/android-camera2-api-example-tutorial/ and have been working at making my own changes to it in an effort to familiarise myself with Android development.

The first thing I di  was to change the file name of the image I created from "pic.jpg" to "PIN_<yyyyMMdd>_<HHmmss>.jpg". I then changed the directory images get saved to to DCIM/Camera/AndroidCameraApi/.

My issue now is that the images get saved in the correct folder but are not visible in the gallery app unless I restart my phone.

Here's what I've done:


I had read somewhere online that I need the sendBroadcast to force a reindex of the AndroidCameraApi folder but it doesn't seem to be working. Perhaps I've done something wrong in here.

Do I need to put something into the manifest relating to ACTION_MEDIA_SCANNER_SCAN_FILE or have I made a mistake with some other aspect of it?

Thanks
Paul
 
reply
    Bookmark Topic Watch Topic
  • New Topic