Kodi Community Forum
Android API to trigger an intent with extras? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184)
+---- Thread: Android API to trigger an intent with extras? (/showthread.php?tid=362601)



API to trigger an intent with extras? - R.O.H. - 2021-05-14

Hi, I'd like to use this function StartAndroidActivity(package,[intent,dataType,dataURI]) but also trigger an intent with extras - which currently is not possible?

Basically I want Tasker and Kodi to interact with each other.

Any help is highly appreciated!


RE: API to trigger an intent with extras? - R.O.H. - 2021-05-15

To be more precise, I want to connect to a server via OpenVPN from a .py script from Kodi.

This is what is working in Tasker:
Code:
Send Intent
Action:android.intent.action.MAIN
Cat:None
Extra:de.blinkt.openvpn.shortcutProfileName: PROFILENAME
Package:de.blinkt.openvpn
Target:Activity

and this is my .py script but it's only taking me to tasker which is really not what I want. I don't want tasker to open at all just do the task silently.

Code:

import xbmc xbmc.executebuiltin('StartAndroidActivity(de.blinkt.openvpn,android.intent.action.MAIN,de.blinkt.openvpn.shortcutProfileName: PROFILENAME)')]

Hope someone can help me.


RE: API to trigger an intent with extras? - cncb - 2021-07-13

Could support for passing in Extras to StartAndroidActivity please be added?


This forum uses Lukasz Tkacz MyBB addons.