Kumaravel Kandasami wrote:
> I have html/css/js files in my asset directory. In the MAIN activity
> class I am redirecting the display of the html files in my asset
> directory to the browser application using Intents.
>
> The browser application is not loading the html page, however if I
> change the code to use external URL it works fine.
>
> Not Working:
>
> startActivity (new Intent(Intent.ACTION_VIEW,
> Uri.parse("file:///android_asset/popup.htm")));
>
> Working:
>
> startActivity (new Intent(Intent.ACTION_VIEW,
> Uri.parse("http://www.saisk.com")));
This is correct behavior.
> I am assuming the Intent are not mapped to the 'scheme' in the url (file
> versu http). Anyone have other suggestions.
Browser cannot load file:/// URLs in general, let alone from inside the
packaged assets of an arbitrary application that isn't the Browser itself.
A URL of file:///android_asset/popup.htm will work OK for an embedded
WebView, though.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---