Android: view local html file not showing all browsers -
my app generating html file, want show user, code follows -
uri uri = uri.parse("file://" + filename); intent browserintent = new intent(intent.action_view); browserintent.setdataandtype(uri, "text/html"); browserintent.addcategory(intent.category_browsable); startactivity(browserintent);
it shows me "complete action using" lists firefox browser. have chrome, opera & dolphin browsers installed well. why dont choose of them ? thank you.
you can use rooted phone, grab chrome apk, use apktool take inside manifest. there see chrome support schemes http/https/about/javascript usually, , file scheme once in following intent filter:
<intent-filter> <action android:name="android.intent.action.view"/> <category android:name="android.intent.category.default"/> <data android:mimetype="multipart/related" android:scheme="file"/> </intent-filter>
so can try change mime type , same investigation other browsers.
Comments
Post a Comment