20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

Launch default application on Android from Kodi
Hello, I want to make an addon that reads directories where I have several files of different formats (pdf, epub, cbr, etc).

I would like to click on one of them and launch default application that has Android for that type of file will be launched.

I have tried a little of everything, but they all failed me.

# It only works on Windows
os.startfile (path)
# Does nothing
os.system ('xdg-open "' + path + '"')
#Does nothing
os.system ('start "' + path + '"')
#Does nothing
os.system ('open "' + path + '"')
#Permission denied
subprocess.call (['xdg-open', path])
#Permission denied
subprocess.call (['open', path])
#Does nothing
webbrowser.open (path, new = 0, autoraise = True)
# The closest, but open Chrome, although from the explorer I have indicated that this type of file (epub in the test, it would open with an APK already installed)
xbmc.executebuiltin ("StartAndroidActivity (,,," + path + ")")

As you can see, I never tell it with which application to open the file, because the idea is to open it with the application that has been set in Android for such files.

Any help / ideas please?

Thanks for your attention.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Launch default application on Android from Kodi00