Page 1 of 1

execute local HTML file in browser

Posted: 17 Jan 2013 09:41
by tomasz.koc
Hi,

I am trying to create a flow which will automatically log in to a WIFI network when it is connected to it.
I have a small login.htm script located on my device in this location: /storage/sdcard0/download/login.htm

How do I make Automagic to execute this file?
I tried
file:///storage/sdcard0/download/login.htm
file://storage/sdcard0/download/login.htm
html://file://storage/sdcard0/download/login.htm

but always I get an error

In Chrome directly and I am able to execute this link:
file://storage/sdcard0/download/login.htm
but never throug Automagic

Any suggestions?
Tomasz

Re: execute local HTML file in browser

Posted: 17 Jan 2013 11:09
by tomasz.koc
I got it working by executing a command:

Code: Select all

am start -a android.intent.action.VIEW -n com.android.chrome/.Main -d file:///storage/sdcard0/Download/login.htm
But it would be nice to have a possibility to do it more easily by "open URL" command.

Regards
Tomasz

Re: execute local HTML file in browser

Posted: 17 Jan 2013 14:00
by Martin
Seems that Chrome is not registered to handle the file scheme.
I will add the possibility to define a specific app (resp. activity) to action Open URL in Browser.

You could also use the action Start Activity with the settings you posted:
Action: android.intent.action.VIEW
Data URI: file:///storage/sdcard0/Download/login.htm
Explicit Component: com.android.chrome/com.android.chrome.Main

Regards
Martin