N Num3 Active Member Licensed User Longtime User Aug 8, 2023 #1 With the changes made to use receivers, what is the best practice to start a foreground service at boot (in example: background location tracking) ? Is it using the #StartAtBoot: True in the service, or creating a receiver for android.intent.action.BOOT_COMPLETED and then start the service from that receiver when the intent comes in?
With the changes made to use receivers, what is the best practice to start a foreground service at boot (in example: background location tracking) ? Is it using the #StartAtBoot: True in the service, or creating a receiver for android.intent.action.BOOT_COMPLETED and then start the service from that receiver when the intent comes in?
Erel B4X founder Staff member Licensed User Longtime User Aug 9, 2023 #2 You cannot start a service from a receiver (while the app is in the background). Upvote 0