No partial wakelock.
** Service (starter) Destroy (ignored)**
** Receiver (starter) OnReceive **
The Starter service should never be started from a receiver.
*** Service (starter) Create ***
Android will not allow you to run a service in so such short intervals! Set it to 30 minutes or more.
Additionally you need to inform about services in android 8 and above.
I read the post about services in Android 8, and At this point I ask for help to correctly create a service that remains always active, which starts every 5 minutes or less, which works from version 6 of Android up to 8.01.
Sub Service_Start (StartingIntent As Intent)
....
StartService(SSync)
- SyncService have the startAt timer
B4X:
Sub Service_Start (StartingIntent As Intent)
...
StartServiceAt("", DateTime.Now + 5 * DateTime.TicksPerMinute, True)
' this is try for not terminate the service
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS