L Luiz Fernando Orlandini Active Member Licensed User Longtime User Jun 5, 2014 #1 Hi All. I have implemented a long duration service, cause I need to run a webservice call every 30 seconds. Code: Copy Sub Service_Start(StartingIntent As Intent) 'my app code StartServiceAt(Me, DateTime.Now + 30 * 1000, False) End Sub When I start the service I used to call Code: Copy StartService(GPSTrack) And when I decided that is not necessary to execute the service any more, I call Code: Copy StopService(GPSTrack) In the first moment, looks that the service stops. But when I finish my APP, after some seconds, the service starts to log my position again. How can I definitely stop the service, and stop to log my position. Can anybody help me? Thanks
Hi All. I have implemented a long duration service, cause I need to run a webservice call every 30 seconds. Code: Copy Sub Service_Start(StartingIntent As Intent) 'my app code StartServiceAt(Me, DateTime.Now + 30 * 1000, False) End Sub When I start the service I used to call Code: Copy StartService(GPSTrack) And when I decided that is not necessary to execute the service any more, I call Code: Copy StopService(GPSTrack) In the first moment, looks that the service stops. But when I finish my APP, after some seconds, the service starts to log my position again. How can I definitely stop the service, and stop to log my position. Can anybody help me? Thanks
DonManfred Expert Licensed User Longtime User Jun 6, 2014 #2 You are missing a Code: Copy CancelScheduledService(GPSTrack) before you stop the service i suppose Upvote 0
L Luiz Fernando Orlandini Active Member Licensed User Longtime User Jun 7, 2014 #3 Thanks DonManfred!!! Works fine now!!! =D Upvote 0