GCM 中的注册应用程序问题 [英] issue with registration app in GCM

查看:18
本文介绍了GCM 中的注册应用程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照本教程教程在我的 android 应用中启用推送通知.我已经在 GCM 中创建了一个用户帐户,然后创建了一个新项目,通过切换按钮启用 GCM 服务.现在我必须获取我的 API 密钥.按照教程的说明,我应该去:

I following this tutorial tutorial to enable push notification in my android app. I've already created an user account in GCM then created a new project, enabled GCM service by toggling ON the button. Now I have to obtain my API key. Following the instructions of tutorial I should have to go:

在左侧边栏中,选择 APIs &身份验证 > 注册的应用程序.点击注册应用.

In the sidebar on the left, select APIs & auth > Registered apps. Click Register app.

但是那里没有已注册的应用程序.你能解释一下怎么做吗?

But there is no Registered apps there. Could you explain me how to do that?

谢谢

推荐答案

我一直在尝试创建基于 php 服务器的服务的实例.我需要一个客户端 ID 和一个私钥文件.我还不需要 api 密钥,但我也会解释我是如何得到它的.

I've been attempting to create an instance of the php server based service. I needed a client ID and a private key file. I haven't needed api key yet, but I'll explain how I got that too.

要从您现在所在的位置获取这些信息,您需要执行以下操作:

To obtain these from where you are now it appears you need to do this:

  1. 进入 API 和身份验证 > 凭据

  1. Go into APIs and Auth > Credentials

在 OAuth 下单击创建新客户 ID 并使用服务帐户选项.这将提供对 JSON 文件和私钥文件的访问.将它们都下载到本地项目中的某个位置.JSON 文件包含一个客户端密钥等.私钥就是它在罐头上写的内容.

Under OAuth click CREATE NEW CLIENT ID and use the service account option. This will provide access to a JSON file and private key file. Download them both to somewhere in your local project. The JSON file contains a client key among other things. The private key is what it says on the tin.

此外,您还可以通过以下方式获取 API 密钥:

Furthermore, you can obtain an API key in this way:

  1. 在公共 API 访问下点击创建新密钥并选择您的选项.(在我的例子中,我试图通过 PHP 连接,所以我选择了服务器密钥).我正在使用 0.0.0.0/32 来启用任何 IP - 不是很安全,但我目前只是在进行原型设计.

希望这有帮助...

这篇关于GCM 中的注册应用程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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