Android Question Detect backround service from my app

gvoulg

Member
Licensed User
Longtime User
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?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top