S Stiffy Member Sep 26, 2020 #1 I got recommended to use the Alarm Manager to show up a notification in the future date. Is it right now because the service to generate notification will be killed when the user closes the app. All of the examples about setting notification (birthday for example) do not work now on android 10. What is the correct way to do it now (just show a right method, I do not need code.
I got recommended to use the Alarm Manager to show up a notification in the future date. Is it right now because the service to generate notification will be killed when the user closes the app. All of the examples about setting notification (birthday for example) do not work now on android 10. What is the correct way to do it now (just show a right method, I do not need code.
Erel B4X founder Staff member Licensed User Longtime User Sep 27, 2020 #2 AlarmManager = StartServiceAt or StartServiceAtExact Upvote 0
S Stiffy Member Sep 29, 2020 #3 A Erel said: AlarmManager = StartServiceAt or StartServiceAtExact Click to expand... Alarm Manager will be killed if the device is booted. So far, I use Alarm Manager with a foreground service to generate an alarm for the far future. But in android 10 foreground service is killed so I can not schedule an alarm activity. Upvote 0
A Erel said: AlarmManager = StartServiceAt or StartServiceAtExact Click to expand... Alarm Manager will be killed if the device is booted. So far, I use Alarm Manager with a foreground service to generate an alarm for the far future. But in android 10 foreground service is killed so I can not schedule an alarm activity.
S Stiffy Member Sep 29, 2020 #4 I try BroadcastReceiver to start my foregound service but it doesn't work in android 9/10 although it does well in android 7.!!! Upvote 0
I try BroadcastReceiver to start my foregound service but it doesn't work in android 9/10 although it does well in android 7.!!!
Erel B4X founder Staff member Licensed User Longtime User Sep 29, 2020 #5 Foreground services are (normally) not killed. Stiffy said: Alarm Manager will be killed if the device is booted. Click to expand... Set your app to start at boot and reschedule the service. Upvote 0
Foreground services are (normally) not killed. Stiffy said: Alarm Manager will be killed if the device is booted. Click to expand... Set your app to start at boot and reschedule the service.
S Stiffy Member Sep 30, 2020 #6 Broadcast Receiver after boot can not start foreground service although it is easily done in MainActivity. What method for starting foreground service from Broadcast Receiver, esp. in android 10? I checked many topics and see there is no answer about this. Upvote 0
Broadcast Receiver after boot can not start foreground service although it is easily done in MainActivity. What method for starting foreground service from Broadcast Receiver, esp. in android 10? I checked many topics and see there is no answer about this.
Erel B4X founder Staff member Licensed User Longtime User Sep 30, 2020 #7 I don't understand your question. Upvote 0
S Stiffy Member Sep 30, 2020 #8 Erel said: I don't understand your question. Click to expand... My question: "How to put a service to the foreground by Broadcast Receiver"? Upvote 0
Erel said: I don't understand your question. Click to expand... My question: "How to put a service to the foreground by Broadcast Receiver"?
Erel B4X founder Staff member Licensed User Longtime User Oct 1, 2020 #9 Starting a service after boot: Step 1: Code: Copy #StartAtBoot: True Don't use the starter service for this. Read about automatic foreground mode. Example: Background location tracking Upvote 0
Starting a service after boot: Step 1: Code: Copy #StartAtBoot: True Don't use the starter service for this. Read about automatic foreground mode. Example: Background location tracking