GCM Configuration

本文介绍如何为Android项目启用Google Cloud Messaging (GCM) 服务,包括查找Google项目编号、启用GCM API及获取API密钥的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

GCM Configuration

Here’s what you have to do in order to enable the GCM service for your Android project


Locate your Google Project Number


The Project Number is automatically assigned by the Google Developers Console when you create a project. You can find the Project Number in the “Dashboard” tab of the Google API console.

Here, 852741519435 is the Project Number you enter in the app. Don’t confuse it with Project ID, which is a completely different identifier & is used only within Developers Console!

Enable GCM and Get Credentials


1. In the main Google APIs Console page, select API Manager.

2. Locate and click Google Cloud Messaging in Mobile APIs section.

3. Enable API.

Now you need to create the API key.

4. Go to the Credential section of the console, click "Create Credentials" and select API key

5. Select a server key or a browser key. The advantage to using a server key is that it allows you to whitelist IP addresses.

6. Press “Create”.

7. Here’s the API Key you will need to configure your application in Pushwoosh Control Panel.

Go to the Pushwoosh Control Panel

8. In your application click on Android->Edit to change the configuration for Android application.

9. Copy your API Key to the field provided.

That’s it! Easy, isn’t it?

MismatchSenderID error

If you receive “Sender Mismatch ID” error when using “Server Key” please try using “Browser Key”

2025-07-03T14:27:05.799533225+08:00 stdout F 06:27:05.799 [main] DEBUG io.netty.handler.ssl.OpenSsl - Supported protocols (OpenSSL): [SSLv2Hello, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3] 2025-07-03T14:27:05.799601063+08:00 stdout F 06:27:05.799 [main] DEBUG io.netty.handler.ssl.OpenSsl - Default cipher suites (OpenSSL): [TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384] 2025-07-03T14:27:05.940850208+08:00 stdout F Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml. Those properties [thrift_prepared_statements_cache_size_mb] are not valid 2025-07-03T14:27:05.940921257+08:00 stderr F Invalid yaml. Those properties [thrift_prepared_statements_cache_size_mb] are not valid 2025-07-03T14:27:05.941107882+08:00 stdout F 06:27:05.940 [main] ERROR org.apache.cassandra.service.CassandraDaemon - Exception encountered during startup: Invalid yaml. Those properties [thrift_prepared_statements_cache_size_mb] are not valid ^C [root@node1 cassandra]# podman ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 21490d5a5e68 docker.io/library/cassandra:4.0 cassandra -f 2 minutes ago Exited (3) 2 minutes ago 0.0.0.0:9042->9042/tcp cassandra 这是日志为什么启动失败
07-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值