execute local HTML file in browser

Post your questions and help other users.

Moderator: Martin

Post Reply
tomasz.koc
Posts: 2
Joined: 17 Jan 2013 09:19

execute local HTML file in browser

Post by tomasz.koc » 17 Jan 2013 09:41

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

tomasz.koc
Posts: 2
Joined: 17 Jan 2013 09:19

Re: execute local HTML file in browser

Post by tomasz.koc » 17 Jan 2013 11:09

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

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: execute local HTML file in browser

Post by Martin » 17 Jan 2013 14:00

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

Post Reply