问题
I am currently implementing a push functionality using Amazon SNS in my backend. Now, I would like to write tests for the backend and make somehow sure that the published notifications get delivered to the endpoint (GCM mobile device).
Is there a way to get a mock registrationID from the Google dev console and check an inbox if any notifications actually arrived? All without ever building an app?
回答1:
GCM works also with Chrome.
And there's a sample Chrome App available here: https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/gcm-notifications - it's available in Chrome's app store and it lets you obtain the registration_id for your sender_id and then see your messages as Chrome notifications. All using a simple popup window, without writing a single line of code.
来源:https://stackoverflow.com/questions/33364218/how-to-test-gcm-notifications-without-app