File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Android and the fly likes Embedding files with package (apk) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Embedding files with package (apk)" Watch "Embedding files with package (apk)" New topic

Embedding files with package (apk)

Mousa Abdullah

Joined: Jul 22, 2010
Posts: 1
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?
I agree. Here's the link:
subject: Embedding files with package (apk)
It's not a secret anymore!