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

Sending high priority message via GCM #19

Closed
jd-alexander opened this issue Oct 16, 2015 · 1 comment
Closed

Sending high priority message via GCM #19

jd-alexander opened this issue Oct 16, 2015 · 1 comment

Comments

@jd-alexander
Copy link

I'm using Notification Hub to send noifications to my Android aplication. My question is by default what priority does the SDK use to send notifications and can this be configured. Based on what I have seen on Google's website https://developers.google.com/cloud-messaging/concept-options?hl=en I can simply add the priority as part of the payload. However I am not sure how the underlying SDK handles this and if it adds a priority by default. This is what I did. The notification is being sent with the code below but I'm wondering if the priority value has any effect.

var payload = new
{
priority="high",
data = new
{
message = new
{
model.Title,
model.Time,
model.Message,
model.NotificationId,
model.NotificationType,
model.SenderFacebookId,
model.TargetId,
model.TargetUserFacebookId
}
}
};

                var json = JsonConvert.SerializeObject(payload);
                await hub.SendGcmNativeNotificationAsync(json, Tag.UserDevice.GetStringValue() + deviceId);
@wesmc7777
Copy link
Contributor

This should work as expected with Azure notification hubs being basically pass-through. The priority would be handled by GCM.

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

2 participants