External web viewer for generated pages

kickaha

Well-Known Member
Licensed User
Longtime User
Is it possible to call the webviewer from within B4A and have it display a html page located on the sd card.

I need it to be the external viewer rather than using the built in web view as my app had to be restricted to portrait only, and the web page needs to be viewed in landscape.

Any help (the more detailed the better) would be greatly appreciated.
 

kickaha

Well-Known Member
Licensed User
Longtime User
Try:
B4X:
Dim pi As PhoneIntents 'you should reference the Phone library.
StartActivity (pi.OpenBrowser("file:///sdcard/yourfile.html"))

Tried that and get an error

android.content.ActivityNotFoundException:No Activity found to handle Intent {act=android.intent.action.VIEW dat=file///sdcard/foo.html fig 0x20000}

If I use
StartActivity (pi.OpenBrowser("http://google.co.uk"))
that works as expected, and I am sure that foo.html exists and the sd card can be read from.

Typing "file:///sdcard/yourfile.html" directly into the browser loads the page.

Anyone any ideas/help.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Thanks Erel, the support you offer is truly amazing. I can now get back to my app.:sign0060:
 
Upvote 0
Top