0

I have a short python program running on Android 6.0.1 (Nexus 7 tablet) It tells the OS to open up an html file.

Unfortunately, when I get the "Open with" dialog box, Chrome is not one of the options. If I pick Firefox, everything works, but I want Chrome.

Here is the python code:

import android
droid=android.Android()
file_name = "file:///storage/emulated/0/Temp/Newspaper/Comics.html"
intent = droid.makeIntent('android.intent.action.VIEW', file_name, "text/html").result
droid.startActivityIntent(intent)
  • you might want to change your tags and description. an Android question on this would be on java, kotlin, or at least using the default android sdk. I'm not sure what kind of wrapper you're using to write your code on python, and I would assume the wrapper itself is missing whatever you're asking. – TooManyEduardos Jul 31 '17 at 00:27

1 Answers1

0

Thanks!! That was the answer.
I was using SL4A to run the python program, so I'm guessing that the error is in their code. If I install ASTRO file manager and switch my python code to say:

file_name = "content://com.metago.astro.filecontent/file/storage/emulated/0/Temp/Newspaper/Comics.html"

It lets me pick Chrome and everything works.