Thanks Mark. But I don't want to use the assets directory, since it's not my project. I am just giving the developers a jar with an html file inside. Of course I can give them two files, a jar to put in their classpath and a html file to put in their assets directory, but i want to avoid that. Anyhow I found a solution to read the file. I am reading the apk file using getPackageManager().getApplicationInfo(getPackageName(), 0).sourceDir; And then by using java.util.zip.ZipFile I retrieve the html file, and copy it to context.getFilesDir().getPath().
On Feb 16, 3:22 pm, Mark Murphy <[email protected]> wrote: > On Thu, Feb 16, 2012 at 4:24 AM, Mark Cz <[email protected]> wrote: > > Hi, > > I am having an android application that is using an external jar that > > has in addition to regular classes an html file. > > > The final apk root directory looks something like this > > > assests > > res > > AndroidManifest.xml > > classes.dex > > resources.arsc > > helloworld.html > > > How can I access from my application to the last file > > "helloworld.html"? > > You move it into assets/ and then use getResources().getAssets().open(). > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

