0

I have implemented an android app that open phone's camera, captures a foto and save it to the device under myfolder. I noticed that the captured pictures are saved first in Google Photos (under album \myFolder) and then after some time to the gallery of the device (again under album \myFolder). Why this is happening? Can the pictures go directly to the mobile's gallery?

    String root = Environment.getExternalStorageDirectory().toString();
    File newDir = new File(root + "/myFolder");
    newDir.mkdirs();  
Thanos Infosec
  • 57
  • 1
  • 10
  • You did not google for it did you? https://stackoverflow.com/questions/31792457/captured-image-was-not-showing-in-gallery-but-it-stored-successfully-in-sdcard – greenapps Apr 26 '18 at 16:15
  • I know that the getExternalStorageDirectory() returns the primary shared/external storage directory in the device. My question is why the device decides to store picture to the "Google Photos" and not in phones gallery. – Thanos Infosec Apr 27 '18 at 07:52
  • Well you have not posted any code that saves images to file or stores them in an app as you claim that is happening. Wrong idea. – greenapps Apr 27 '18 at 08:00
  • You cannot save pictures in 'the Gallery' as the Gallery is an app and no storage location. The Gallery just shows the pictures which are on your device. Google Photos does that too. And now it happens that one app 'discovers' your new pictures sooner than the other. – greenapps Apr 27 '18 at 08:02
  • From your comments I understand that the pictures first stored in primary external storage (SD card) or internal storage directory ( i see these fotos in my device in File Manager), and then either "Google Photos" app scans or "Gallery" app scans these photos. But I noticed always the scan of Gallery delays in comparison with Google Photos. – Thanos Infosec Apr 27 '18 at 08:25
  • You can get them be shown by Gallery immediately if you follow the link in my first comment. Thats why i posted that link. – greenapps Apr 27 '18 at 09:44
  • After following the notes in https://stackoverflow.com/questions/31792457/captured-image-was-not-showing-in-gallery-but-it-stored-successfully-in-sdcard, it worked – Thanos Infosec May 02 '18 at 11:19

0 Answers0