In case anyone is ever looking to do the same ...(load html from sqlite and reference assets for JS, CSS, images etc)
webview.loadDataWithBaseURL( "file:///android_asset/", html, "text/html", "utf-8", null ); Then have relative path to assets within html and you're golden. -Stace On Thu, Jul 8, 2010 at 2:55 AM, Maxood <[email protected]> wrote: > Look into the WebViewDemo here: > http://code.google.com/p/apps-for-android/ > > Maqsood > > On Jul 7, 10:21 pm, Connick <[email protected]> wrote: > > I'm loading html into a webview from my assets folder, works no problem. > In > > my second experiment I've loaded HTML from a database (after pulling from > > remote source) and displayed in a webview (also no prob) ...Now I'm > trying > > to change the baseref inside the html to have all JS and CSS references > > point to source files under assets. This part doesn't seem to work. I get > > warnings from the web console that it can't load these files due to > security > > issue. > > > > Now I've resorted back to a content provider and overriding openFile (and > > setting base ref with content://...) but now I'm hitting another problem > > with the JS and CSS files in assets being compressed. > > > > Before I dig deeper, am I over-complicating this? > > > > Cheers, > > Stace > > -- 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

