You can fetch the context of the downloaded application from your application and use the resources. You can get a resource by using the name of the resource directly or by getting the id from the name. It works, maybe with a little changes .
On Mar 8, 9:28 am, arbitrary-software <[email protected]> wrote: > Hi, > > I have an .apk that is downloaded to my Android app. In the .apk, it > has a directory tree of images that my app needs to load and display. > Is there a way in Android that I can get an InputStream to the image > file in the .apk and use it to instantiate a Bitmap object? I have not > been successful with ClassLoader.getResourceAsStream(). I think that > gives me a JarInputStream instance, but how do I create the Bitmap > object from that? I can use getResourceAsStream to copy the file to > the device file system and instantiate no problem through > BitmapFactory, but if I have 50 images, then that file copy is so slow > and uses disk space. I'd much rather have the nicely packaged apk use > the files "in place" if I could. > > I havent looked at the Android OS source code, but it must use the > resource files "in place" instead of expanding my .apk to disk, right? > If it can do it, then an app should be able to also. > > Any tips? > > Thx! > -Dave -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

