Search code examples
androidhybrid-mobile-app

Android Asset folder image automatically copying to gallary


Greetings dear readers,

I have this query which the team is facing. We are developing a hybrid app for android platform and ran into one issue that seems to get complicated.

Here it goes.

Team is calling static HTML pages(no control on html content modification) in a web view, the html page content involves images which are taken from asset folder. Now when we are debugging the application on android device, asset folder images are getting copied automatically in gallery.

I am not a native coder but it seems asset folder images will be copied automatically. Please correct me if I am wrong. Is there any way, When I debug my app on device I could restrict this automatically copying of asset images to device gallery.

As I am not from Android, this might be the silly question but any help in this scenario would be highly appreciated.

I have researched on google to find out possible fix but unable to find one.

Guys, please suggest.....Any leads on this....

enter image description here


Solution

  • If you don't want your photos being accessible from gallery, add .nomedia file to the folder copied onto the device. This will prevent photos from appearing into gallery.