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

-- 



Other Threads

1. HTC G1 Dream with cupcake STK (SIM Toolkit) not found

Location: Southern Italy
About Phone:
 - Bought: United Kingdom
 - Model number: T-Mobile G1
 - Firmware Version: 1.5
 - Baseband Version: 62.50S.20.17H_2.22.19.26I
 - Kernel Version: 2.6.27-00393-g6607056
 - Build Number: CRB43

My target is: Put in my HTC Dream two SIM.

In my phone there is no STK package, I saw that in /data/system/
packages.xml there aren't any STK package.

I have download CVS version of cupcake, and in packages/apps/Stk/
there is a STK tool.

On internet some people say:
 - STK is implemented in cupcake
 - In cupcake you see STK only if in your SIM there is a "Menu"

I think that in T-Mobile android update, STK is not present.

Anyone have same my situation?
Anyone have two sim in HTC Dream?
If in your phone STK is present, could you post package.xml? ( adb
shell cat /data/system/packages.xml > package.xml)

PS: In my update also localization is strange, I have only Spain and
English localization.


--~--~---------~--~----~------------~-------~--~----~

2. sound in the raw folder

Ok sorry for being so newby, but well i'm a newb.

I'm trying to get sound working for an app i'm working on, i put
my .mp3 file into the resource/raw folder, but for some reason it
doesn't like that, is it because of the format or is it supposed to go
somewhere else, I couldn't seem to find this answer when searching,
but if it's there I'm sorry.

Thanks,
Sean

--~--~---------~--~----~------------~-------~--~----~

3. How to force hierarchy change to PreferenceActivity?

4. Getting my app in the featured section

5. Understanding MenuCallback code

6. How to customize android by creating a new target product definition

7. Listening to Double Taps in MapView