GCM API密钥混淆 [英] GCM API Key confusion
问题描述
我想为我的项目使用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:
- 服务器密钥
- 浏览器密钥
- Android密钥
- 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客户端
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屋!