如何在Android的PhoneGap的测试推送通知? [英] how to test push notification in android phonegap?

查看:137
本文介绍了如何在Android的PhoneGap的测试推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了推送通知示例项目由 MarkNutter项目和进口其作为Android项目其工作罚款,现在我能够从设备注册

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?

推荐答案

有,也许你还没有做了一些步骤:

There are some steps that maybe you haven't done yet:


  1. 首先,你必须在谷歌API的网站,选择服务注册: HTTPS://$c$c.google。 COM /的API /控制台/

  2. 打开谷歌云消息拨动到ON

  3. 在服务条款页面,接受terms.Now您需要创建服务器密钥

  4. preSSAPI访问按钮

  5. preSS创建新的服务器密钥。无论是服务器密钥或浏览器键应该工作。使用服务器密钥的优点是,它可以让你白名单的IP地址。

  6. preSS创建。

  7. 您可以找到从URL您的专案编号在你的谷歌API控制台。通常它看起来像这样:<一href=\"https://$c$c.google.com/apis/console/#project:12345678912:access\">https://$c$c.google.com/apis/console/#project:12345678912:access在这个例子中,这将是:12345678912

  8. 与您的应用程序ID和发件人ID只是改变他们在code你MarkNutter项目获得,你会做。

  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.

这篇关于如何在Android的PhoneGap的测试推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆