GCM API密钥混淆 [英] GCM API Key confusion

查看:148
本文介绍了GCM API密钥混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的项目使用GCM,因此我在Google控制台上创建了一个项目,并希望添加api项。现在我有不同的选择:

I want to use GCM for my project and so i create a project at google console and wanted to add an api key. Now i have different options:


  1. 服务器密钥

  2. 浏览器密钥
  3. Android密钥

  4. iOS密钥

我真正想要做的是发送GCM消息从我的Apache服务器使用PHP到我的Android设备。那么我现在需要哪种钥匙?服务器密钥?浏览器密钥或Android密钥?

What i actually want to do is sending GCM Messages from my Apache Server using PHP to my Android devices. So which kind of key do i need now? The Server Key? The Browser Key or the Android Key?

我知道我需要的是我的Android客户端 SENDER_ID 这是我的项目的ID。我只需要API密钥服务器端。

I know that all i need at my Android Client side is the SENDER_ID which is the id of my project. I just need the API key serverside.

推荐答案

您需要服务器密钥。使用它,您可以在 PHP 中使用 cURL 向Android设备发送推送通知。

You need the Server Key. Using it you can send push notifications to Android Devices using cURL in PHP.

这篇关于GCM API密钥混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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