assets referenced in HTML

by miketra » Mon, 02 May 2011 07:12:52 GMT


Sponsored Links
 I have an app that includes HTML files in the assets folder. I am able
to load the initial HTML page successfully under all conditions using
the following command in code:

mWebView.loadUrl("file:///android_asset/start_page.htm");

Now, within start_page.htm, I have a bunch of links that can be
clicked, and each link references another HTML file that I have
included in the assets folder.

For some strange reason, all the links load fine on my Droid (2.2.2),
but none of the links load on a Droid X (2.2.1). The links are setup
like this on my Droid inside of start_page.htm:

<a href="page2.htm">Page 2</a>

The above works on the Droid, but not on Droid X. I then tried the
following:

<a href="file:///android_asset/page2.htm">Page 2</a>

This also does not work on Droid X, but works fine otherwise. Does
anyone know why this may be? On the emulator running 2.2.1, it works
fine. I'm not sure what else to try, and I'm not sure what the problem
could be.

Thanks,

-Miketra

--