React-native-fcm: Wake on Notification on Android

Created on 2 Jan 2018  路  17Comments  路  Source: evollu/react-native-fcm

This might not be an issue...
I don't know where to ask this.
So I made my android push notification worked, however I want to wake my android devise screen on when I receive the push notification. I get sound and vibrate, I just need to turn on the screen.

I am a ios user, so it might not understand how android handles push notifications...
Please help me with this :D
Thanks

Most helpful comment

published as v11.1.0

All 17 comments

priority: 'high' or 'max'
there could be an phone setting regarding waking up the screen as well

Thanks for the fast reply.
I tried with 'high' and 'max' but not working...
I enable every notification setting but still no luck..
I am using galaxy 6 with android 7.0
Don't I need to set Wake_ON? on android native code?
and just for more information this is may payload(using custom_notification)

"custom_notification": {
  "body": "test body",
  "title": "test title",
  "color":"#00ACD4",
  "priority":"max",
  "icon":"ic_notif",
  "group": "GROUP",
  "id": "id",
  "sound": "default",
  "show_in_foreground": true,
  "content_available":true
}

seems that is designed behavior of some devices?
there is even an app for that Glimpse Notifications

what do you mean by Wake_ON?

I am sorry, It was wake_lock
I read that if I want to wake the screen, I need to write a Native code to achieve this.

try add that permission and see. if it works I will update readme

I added
<uses-permission android:name="android.permission.WAKE_LOCK" />
in android/app/src/main/AndroidManifest.xml and still no luck..

do you have any other device to try?

No, but I can try with the emulator.

I just tried with Pixel_API_27 and It's not working either.

quick question. how does other android apps perform? like facebook, do they wake up the screen?

Since I am ios user(never used android), I am not sure..
As far as I researched, usually android app doesn't wake up the screen.
However, message app like telegram or whatsapp might have settings that enabling wake up screen.

I found this stackoverflow answering how to wake up screen when push is coming

https://stackoverflow.com/questions/9631869/light-up-screen-when-notification-received-android

can anyone help me implementing this natively( or js if possible)

will do. and I will add a new property called wake_screen

published as v11.1.0

I am using 14.0.0 - for remote notification mine is not waking. Do I need to include some permission?

hello, I've checked that wake_screen is already in the source code, but how to use it? I already add wake_screen inside the payload, but still no luck.

@NinoMartino i also couldn't figure it out.

Was this page helpful?
0 / 5 - 0 ratings