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

Android, example doesn't work when it goes into background #94

Closed
tyrtok opened this Issue Sep 2, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@tyrtok

tyrtok commented Sep 2, 2015

The example works when compiled and run using Cordova. However, once the application goes into background, it doesn't notify user in terms of notification. However, response from GCM states 'OK'.

anyone idea how to make it work on android?

@BigBirdRook

This comment has been minimized.

Show comment
Hide comment
@BigBirdRook

BigBirdRook Sep 2, 2015

Use Google Chrome Postman and send test message to GCM in this format:

{
"registration_ids": ["...your_reg_id..."],
"data" : {"message" : "Your test message"}
}

More details about test message by Postman here:
http://stackoverflow.com/questions/22168819/android-test-push-notification-online-google-cloud-messaging

It works for me...

Use Google Chrome Postman and send test message to GCM in this format:

{
"registration_ids": ["...your_reg_id..."],
"data" : {"message" : "Your test message"}
}

More details about test message by Postman here:
http://stackoverflow.com/questions/22168819/android-test-push-notification-online-google-cloud-messaging

It works for me...

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 2, 2015

Member

@tyrtok when the app is in the background do you get the notification in the notification shader?

Member

macdonst commented Sep 2, 2015

@tyrtok when the app is in the background do you get the notification in the notification shader?

@tyrtok

This comment has been minimized.

Show comment
Hide comment
@tyrtok

tyrtok Sep 3, 2015

Problem solved by changing the json data set sent to GCM.

tyrtok commented Sep 3, 2015

Problem solved by changing the json data set sent to GCM.

@tyrtok tyrtok closed this Sep 3, 2015

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot Jun 5, 2018

This thread has been automatically locked.

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.