Kodi Community Forum
How I can stop a addon? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: How I can stop a addon? (/showthread.php?tid=348912)



How I can stop a addon? - Peziman - 2019-11-03

I am currently creating a service addon for my Raspberry Pi.
With this service addon I want to start a other addon with a signal at the GPIO. If the signal is gone at the GPIO, then the main menu should be displayed again.
So far, so good .... If I set GPIO to high, the addon will be started and displayed correctly. I use this command.
Code:
xbmc.executebuiltin("XBMC.RunScript(" + addon_path + "/addon.py)")

But I can not find a way to quit the addon or change the window.
For example, with this command.
Code:
xbmc.executebuiltin("ActivateWindow(Home)")
Nothing is happening....

Does anyone have any idea how to solve this problem?

Thanks in advance for your help.


RE: How I can stop a addon? - ronie - 2019-11-03

if your addon opens a dialog, it needs to be closed before you can activate another window.
python:
xbmc.executebuiltin("Dialog.Close(all)")



How I can stop a addon? - Peziman - 2019-11-03

I have already tried...
Code:
xbmc.executebuiltin("Dialog.Close()")
And it doesn't work.
But the "all" argument could be good hint.
I will try it later. [emoji106]


RE: How I can stop a addon? - Peziman - 2019-11-03

(2019-11-03, 01:16)ronie Wrote: if your addon opens a dialog, it needs to be closed before you can activate another window.
python:
xbmc.executebuiltin("Dialog.Close(all)")
When I tried this, nothing happened.
To close the addon I must click on the back button from the addon screen.