Hi Mark,

First thanks a lot for your answers...

After having tried to use "addJavascriptInterface", I start working on
the ContentProvider-based solution that you described.
With this solution can I just create/open/read/delete a file in which
I would store my string (javascript + html) so that I could use
loadUrl or loadDataWithBaseURL properly using the url "content://
blabla.provider"?

I am not sure exactly how to proceed.

Thanks
Polo

On Nov 21, 4:26 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> polo777 wrote:
> > Re,
>
> > Actually, I still have a problem.
> > When I use this trick, the javascript containing in my page doesn't
> > work whereas the same page(html/javascript) works when I load it from
> > the network or from a file:///android_asset/myfile.html.
>
> > Anything?
>
> Your simple options are:
>
> 1. Instead of your fake base URL, use a real network URL pointing to the
> spot where the Javascript, images, and other stuff lives. Of course,
> this will require a network connection to work. You may wish to also
> supply your WebView with a WebViewClient implementation, so you can hook
> shouldOverrideUrlLoading() to determine if a given clicked-upon link
> should go to the Internet or should be loaded from your
> locally-generated content.
>
> 2. Don't use WebView for locally-generated material.
>
> Your more complicated options include building a ContentProvider for
> serving your HTML, Javascript, and whatnot, and using the appropriate
> content: URL to load it.
>
> In general, Android makes it rather difficult for one to support
> locally-hosted Web content.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to