Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCM Notification does not wake up my Android device when it is in sleep mode and the app is not running #905

Open
mbullock976 opened this issue Jul 5, 2019 · 0 comments

Comments

@mbullock976
Copy link

mbullock976 commented Jul 5, 2019

What version of PushSharp are you using?
4.0.10

Describe your issue:
Unable to wake the android phone when I receive a Push GCM Notification

What are the steps required to reproduce this issue?

  1. Ensure my app has been started once
  2. Restart phone
  3. Ensure phone is on lock screen and screen light is off i.e sleep mode
  4. Send GCM notification from my Rest API
  5. I receive notification as I hear the notification sound, but I don't see the message as the device is still in sleep mode. (the notification is on lock screen) but it never wakes the device up for the user to see it.

I don't have this problem with IOS.

This is the message I'm sending. My android phone does not wake up when it receives this notification below, it only produces the sound and the screen is still in sleep mode

gcmNotification = new GcmNotification
{
To = notification.DeviceToken,
Data = JObject.FromObject(new
{
title = notification.Title,
body = notification.Body,
encrypted = notification.Encrypted,
eventName = notification.EventName,
eventArgs = notification.EventArgs,
priority = 2
}),
Priority = GcmNotificationPriority.High,
TimeToLive = 0
};

This is my android manifest xml:

new 84.txt

Please can someone help, thank you

@mbullock976 mbullock976 changed the title GCM Notification does not wake up my Android device when it is in sleep mode GCM Notification does not wake up my Android device when it is in sleep mode and the app is not running Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant