On 06/24/2010 12:29 PM, kypriakos wrote:
Is it possible for the emulator's browser to read the local disk on
the machine it is running
on and read/execute javascript code? All I was able to achieve was to
open public URLs
- even though I have not managed yet to get it to connect to the
public Net.
Assuming you mean a html page coming from the local file system
that is in your app bundle, the answer is yes.
yourwebview.loadDataWithBaseURL ("file:///android_asset/", page,
"text/html", "utf-8", null);
where page is something like R.raw.yourwebpage. All you need to do is put
your html files in res/raw and it works like a charm.
Mike
--
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