Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Embedding files with package (apk)

 
Mousa Abdullah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to build an small photo gallery/album app that'll include the images in a folder. Users can install the program and browse the photos with it.

I was able to include the photos in res/drawable and achieve the work. But, in case I change /add / remove files, I have to redo a lot coding, specially change the image names to get their resource id. Also, I have to manually count the number of files and build arrays accordingly.

I noticed there are methods to list and read files from /data/data/package/files, but that directory is only available during runtime and no way to put a directory directly in the app and access it by those methods. So, can anyone tell me how I can achieve this or any other better way?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic