Forum Xamarin.Android

Where to store photos, so gallery doesn't see them?

Hi there,
I encountered a problem recently. Basically, I have an Xamarin.Forms app that takes photos and then sends them to server, however, before the photos are sent, I need them to be safe from the user (deleting them, moving them, Google Photos deleting them, etc.). I've tried saving them to the DCIM\Camera directory, where all photo apps could see them (obviously). But then I've also tried Documents\MyApp, no luck. My desire is to have the photos somewhere hidden from all other apps, is there any directory I could use for that?


  • jezhjezh Member, Xamarin Team Xamurai

    You can try to encrypt these photos, and after encrypting, no one else can read your files. And use decryption algorithms to decrypt these files when needed.
    I encrypted and decrypted some video and image files in this way. This ensures the security of data.

  • michaldivismichaldivis Member ✭✭

    That solution has some drawbacks I would like to avoid. The problem is there is a lot of photos per day and the average file size is 4-6 MB. I'm not allowed to compress the photos or affect them in ant way (quality wise). While encrypting them would be a good solution, I would have to have a copy of the file to use in the app (ListView, etc.). I'm aware that I could just decrypt the files any time the user needs to see them, but wouldn't that be pretty slow for 20-30 files? I don't want my page loading times to grow too much... Thanks!

  • jezhjezh Member, Xamarin Team Xamurai

    Maybe you can try to store the photos in the Private external files owned by the app .
    For more details:

Sign In or Register to comment.