I have two different apps
My first app is a service (noUI) to run as sticky to log GPS coordinates all day.
When I start my main app I want to start this sticky service (first app).
I know how to do it.
B4X:
Dim in As Intent
Dim pm As PackageManager
in = pm.GetApplicationIntent("firstapp")
If in.IsInitialized Then StartActivity(in)
.
The question is how do I know if it is already running so I don't have to start it again the
next time I start the main app?
In fact I don't want to exchange values or communicate between the two apps.
I just want to know if the first app ( a sticky service ) is already running.
I can't see the answer to this in this tutorial .
Am I missing something?
Regards
George
Send a intent to the other app. When the other app receives such an intent it responds with another intent.
At the end you did a Handshake and know it is alive because it responds.