Android Question Confused with notifications, when phone is sleeping...

Olli73

Member
Licensed User
Longtime User
Hello, I have an older App, build with the "old" activities and Services. On newer Android Versions I have the problem, that the notifications are not shown then expected...
My aim is:
1. Getting a Message by Firebase notifaction. This part is working. I get a short notification on the phone.
2. Show an reminder, if the Message is not readed - for example after 5 minutes. This part is not working....

After getting the message by firebase notifaction, I try to set a "wake up call" by
StartServiceAtExact(Reminder, DateTime.Now + 5 x DateTime.TicksPerMinute, True)

"Reminder" is a foreground service. But it seems, that the Service does not start, when the phone is sleeping....
What is the best way to do this on new Android Versions?
 

Alexander Stolte

Expert
Licensed User
Longtime User
What is the best way to do this on new Android Versions?
Have you updated the firebase part anyway?

build with the "old" activities and Services
Receiver is the way to go instead of service:
 
Upvote 0

Olli73

Member
Licensed User
Longtime User
Firebase is up to date and received the message.
If the App is on the screen, everythink is ok. But if the Phone go sleeping, I got the problems.
What is the best way now to Show a notification or make a beep, when the Phone is sleeping? I try to log the receiver_receive Event in the Service, which should Show the notification. But it seems, that the receiver Event is not fireing. I dont found a sample code in the forum, till now.

1.FB receive message
2. Start another Service, which do something in background, by StartReceiver
3 . After background work, start the next Service to Show a notification on screen or make beep to inform the user. Also by calling StartReceiver (or can I use her the old way: StartService?

At Step 3 I have the problems...
 
Upvote 0
Top