T Tomas Petrus Active Member Licensed User Longtime User Jan 10, 2019 #1 Been strugling a while.... I have upgraded from FusedGPS to new GPSTracker. I get that by this: Code: 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 ?
Been strugling a while.... I have upgraded from FusedGPS to new GPSTracker. I get that by this: Code: 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 Jan 10, 2019 #2 Tomas Petrus said: I can correctly stop the service. But when to call it ? Click to expand... when you do not need it anymore. If you do not stop it will run again based on the schedules restart of the service. Tomas Petrus said: Application (UI) can be killed by Swipe or from Application list, that is intented kill so I want to kill the service. Click to expand... the GPS tracker will not be killed. And if then it will be restartet based on the running schedule. Upvote 0
Tomas Petrus said: I can correctly stop the service. But when to call it ? Click to expand... when you do not need it anymore. If you do not stop it will run again based on the schedules restart of the service. Tomas Petrus said: Application (UI) can be killed by Swipe or from Application list, that is intented kill so I want to kill the service. Click to expand... the GPS tracker will not be killed. And if then it will be restartet based on the running schedule.
T Tomas Petrus Active Member Licensed User Longtime User Jan 10, 2019 #3 the GPS tracker will not be killed. And if then it will be restartet based on the running schedule. Click to expand... 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
the GPS tracker will not be killed. And if then it will be restartet based on the running schedule. Click to expand... 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 ?
DonManfred Expert Licensed User Longtime User Jan 10, 2019 #4 Start you app, go to the activity to stop the service and the schedule, Run the stopping code here. Quit your app. Upvote 0
Start you app, go to the activity to stop the service and the schedule, Run the stopping code here. Quit your app.
T Tomas Petrus Active Member Licensed User Longtime User Jan 10, 2019 #5 sorry still dont understand Is there any method like: Code: 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
sorry still dont understand Is there any method like: Code: Sub Activity_Destroy end sub Or how am I supposed to handle it ?? ATM I am not using any other activity then Main ...
DonManfred Expert Licensed User Longtime User Jan 10, 2019 #6 Tomas Petrus said: Is there any method like Click to expand... no Tomas Petrus said: ATM I am not using any other activity then Main ... Click to expand... then put the stiopping code in main called by a menuitem or a button Upvote 0
Tomas Petrus said: Is there any method like Click to expand... no Tomas Petrus said: ATM I am not using any other activity then Main ... Click to expand... then put the stiopping code in main called by a menuitem or a button
T Tomas Petrus Active Member Licensed User Longtime User Jan 10, 2019 #7 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
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
DonManfred Expert Licensed User Longtime User Jan 10, 2019 #8 Tomas Petrus said: How Am I supposed to catch this event ?? Click to expand... There is no such event Upvote 0
Tomas Petrus said: How Am I supposed to catch this event ?? Click to expand... There is no such event
Erel B4X founder Staff member Licensed User Longtime User Jan 10, 2019 #9 The TaskRemoved in the starter service is raised (in most cases) when the user swipes out the app from the recent apps list. Upvote 0
The TaskRemoved in the starter service is raised (in most cases) when the user swipes out the app from the recent apps list.
T Tomas Petrus Active Member Licensed User Longtime User Jan 10, 2019 #10 yep that was it thx : ) Upvote 0