Android Question GPS Tracker correct stop

Tomas Petrus

Active Member
Licensed User
Longtime User
Been strugling a while....

I have upgraded from FusedGPS to new GPSTracker.
I get that by this:

B4X:
CancelScheduledService(Me)
StopService(Me)

I can correctly stop the service. But when to call it ?
Application (UI) can be killed by Swipe or from Application list, that is intented kill so I want to kill the service.
is there any method like Activity_Destroy ??
or ?
 

DonManfred

Expert
Licensed User
Longtime User
I can correctly stop the service. But when to call it ?
when you do not need it anymore. If you do not stop it will run again based on the schedules restart of the service.
Application (UI) can be killed by Swipe or from Application list, that is intented kill so I want to kill the service.
the GPS tracker will not be killed. And if then it will be restartet based on the running schedule.
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
the GPS tracker will not be killed. And if then it will be restartet based on the running schedule.

And thats it I want to kill it...
Now if user kill the app I have to restart phone...to get rid of the tracker.
what is correct approach ?
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
sorry still dont understand

Is there any method like:
B4X:
Sub Activity_Destroy
end sub

Or how am I supposed to handle it ??
ATM I am not using any other activity then Main ...
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
There is no such button....
I am speaking about situation when user kill the App by swiping out from active applications

How Am I supposed to catch this event ??
If he do it even accidentally Then he has no way to kill the tracker because there is no App and no button....
And Tracker is immortal
 
Upvote 0
Top