问题
I downloaded the push notification sample project from MarkNutter Project and imported it as android project its working fine as of now I am able to register from device
Since I do not have some server to send notification to device, How sould I test if the device is receiving some notifications?
回答1:
There are some steps that maybe you haven't done yet:
- First you must register in Google APIs site, select Services: https://code.google.com/apis/console/
- Turn the Google Cloud Messaging toggle to ON
- In the Terms of Service page, accept the terms.Now you need to create the Server Key
- Press “API Access” button
- Press “Create new Server key”. Either a server key or a browser key should work. The advantage to using a server key is that it allows you to whitelist IP addresses.
- Press “Create”.
- You can find your ProjectID from the URL in your Google API console. Usually it looks like this: https://code.google.com/apis/console/#project:12345678912:access In this example, it would be: 12345678912
- With your app ID and sender ID just change them in the code you get from MarkNutter Project and you'll be done.
来源:https://stackoverflow.com/questions/12952653/how-to-test-push-notification-in-android-phonegap