how to test push notification in android phonegap?

Deadly 提交于 2019-12-10 20:19:41

问题


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:

  1. First you must register in Google APIs site, select Services: https://code.google.com/apis/console/
  2. Turn the Google Cloud Messaging toggle to ON
  3. In the Terms of Service page, accept the terms.Now you need to create the Server Key
  4. Press “API Access” button
  5. 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.
  6. Press “Create”.
  7. 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
  8. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!