mroulias wrote: > Hi, > > I am trying to create a hybrid Android app which pulls html content > from a web server and renders it in a WebView. However, I also want > the external html to be able to reference images that are packaged > within the android app. I realize that currently it is not possible to > do something like <img src="file:///my_image.jpg" /> in the html. > > I have seen discussions of using the ContentProvider to create name > spaces in the html, however all of these examples seem to assume that > the actual html page is also on the device and tend to use > WebView.loadData(). > > So, is there someway that it is possible to do this? The main goal is > to package all the application images/css in the android app, but put > the bulk of the application on an external server that returns the > actual markup.
So long as you use content:// URLs for the images and other assets being served from the ContentProvider, I would expect it to "just work". I have an app that works in the reverse direction (local HTML, remote images) and that works fine so long as I fully-qualify the image URLs. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

