I'm trying to implement an alarm whenever the app is receiving a push notification from Firebase Cloud Messaging, is there a way to do it? when the device in on sleep or not sleeping. Not necessarily must be an alarm, at least something that can alert the user (notification sound is not enough to alert user)
Asked
Active
Viewed 925 times
3
-
Possible duplicate of [Launch screen from native background service](https://stackoverflow.com/questions/54054527/launch-screen-from-native-background-service) – Richard Heap Jan 29 '19 at 13:45
-
You mind sharing with me on how you do it ? @RichardHeap , maybe some example so i can refer, especially on the dart file part – ali Jan 30 '19 at 09:55
-
you can do much of it using the `flutter_local_notifications` plugin. If that's missing functionality, then just add it yourself. The linked answer is an example. – Richard Heap Jan 30 '19 at 12:03
-
It's a good example of how to do it. You might need to enhance it. Currently it can make a sound and vibration and provide an notification for the user to interact with to open the app. If you want more you need to see the instructions in the linked answer. – Richard Heap Jan 31 '19 at 03:53
-
I've tried on both device with >=26 API and <26 API, it seems that the sound only works for API < 26 , do you know what seems to be the problem? @RichardHeap – ali Jan 31 '19 at 03:59