Hi Robert,
many thanks for answering.
Just few comments on your response:
Certainly there is nothing 'automatic' in p4a.
Maybe I did not understand you here but I did not mean to p4a do something automatically but to I implement in kivy (foreground) service some logic to periodically check whether my kivy app is running/paused/stopped and act accordingly.
Generally this would seem like a security risk if a background activity can start an unrelated foreground activity.
Again maybe I did not understand you but if my service is started from my kivy app like:
from jnius import autoclass
service = autoclass('org.test.myapp.ServiceMyservice')
mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
argument = ''
service.start(mActivity, argument)
and if clicking on my service's persistent notification resume/start my kivy app aren't they related somehow more than with some 3rd app?
But as you said: even if it would be possible if it would steal the screen for "4 seconds" it would be the same "annoying" behavior.
I hoped to keep/refresh my kivy app in task list but not on screen.
And one potentially naive question: Is it possible to throw/make any GUI widget from service (not main app)? I suppose not but hope dies last :)
Thanks and best regards