I have written an app that has a non-Starter service based on the Tracker service in Erel's MyLocation example in:
https://www.b4x.com/android/forum/threads/background-location-tracking.99873/
The service I have written contains a Service_Start subroutine:
where Checkmsg goes off and checks for messages in an AWS S3 bucket.
In one of the posts in the above referenced thread Erel states:
And this is generally true - if I manually try to kill it it rises again on schedule.
However I have found that I can permanently kill it with Kapersky's Battery Life app:
https://play.google.com/store/apps/details?id=com.kaspersky.batterysaver
This app allows you to kill everything in sight - but it warns that some apps will resurrect themselves.
And sure enough apps like Google Play Store will arise again.
But my app doesn't.
How can I make my app replicate the behaviour of Google Play Store?
https://www.b4x.com/android/forum/threads/background-location-tracking.99873/
The service I have written contains a Service_Start subroutine:
B4X:
Private Sub Service_Start (StartingIntent As Intent)
'Set up a starter notification
Private wrk_notif As Notification
wrk_notif.Initialize2(wrk_notif.IMPORTANCE_LOW)
wrk_notif.Icon = "icon"
wrk_notif.Sound = False
wrk_notif.Vibrate = False
wrk_notif.SetInfo("TreeTops http messages", "Started...", Main)
'Bring service to foreground state and display starter notification - fires
'activities in Main
Service.StartForeground(Main.Gen_notification_id_low, wrk_notif)
'Start service again in 60 secs
StartServiceAt(Me, DateTime.Now + 60 * DateTime.TicksPerSecond, True)
'Check for messages
Checkmsg
End Sub
where Checkmsg goes off and checks for messages in an AWS S3 bucket.
In one of the posts in the above referenced thread Erel states:
This app is intended to always run so it is never stopped.
And this is generally true - if I manually try to kill it it rises again on schedule.
However I have found that I can permanently kill it with Kapersky's Battery Life app:
https://play.google.com/store/apps/details?id=com.kaspersky.batterysaver
This app allows you to kill everything in sight - but it warns that some apps will resurrect themselves.
And sure enough apps like Google Play Store will arise again.
But my app doesn't.
How can I make my app replicate the behaviour of Google Play Store?