Android Question StartServiceExact for Android 14

hanyelmehy

Active Member
Licensed User
Longtime User
Does an app that sends multiple notifications per day (e.g., 5-10 times daily for medical reminders) using a Receiver with StartServiceExact require the android.permission.FOREGROUND_SERVICE permission to work on Android 14? It works fine on Android 13 and below
 

hanyelmehy

Active Member
Licensed User
Longtime User
You should use a receiver for this, not a service.
i already use reciver ,please check my post (using a Receiver with StartServiceExact)
did this require the android.permission.FOREGROUND_SERVICE permission to work on Android 14? It works fine on Android 13 and below
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
 
Upvote 0

hanyelmehy

Active Member
Licensed User
Longtime User
A receiver will never need the FOREGROUND_SERVICE permission. This permission is needed when you call Service.StartForeground (in some cases it is called by the framework). Something that isn't possible with receivers.
the issue with me ,some times i get errors on android 14 ,please check attached crash report
notes
i have no StartForeground
i just use StartServiceExact
 

Attachments

  • crash.txt
    20.2 KB · Views: 18
Last edited:
Upvote 0

hanyelmehy

Active Member
Licensed User
Longtime User
Thank you for your help
can you please sugget
This error happens on Android 14 when the starter service is being started while the app is in the background. This is no longer possible.
This is reason for the starter service not being started when receivers are started.

Maybe you are doing something wrong in the receiver. Or maybe the error isn't related.

Thank you for your feedback and for pointing that out! I appreciate your assistance. Could you please provide more details or examples of what might possibly be wrong in the receiver? This would help me narrow down the issue and address it more effectively.
Notes :
Everything works perfectly on Android 13 and older versions.
sometines error happens even when app in forground
 
Last edited:
Upvote 0
Top