我尝试使用带有 Appcelerator Studio 4.3.3 的 4.1.0.GA sdk 钛中的 ti.cloudpush 模块获取设备令牌。
我使用服务器密钥创建了 google API 项目,并在我的 appcelerator 帐户中使用 GCM API 密钥和 GCM 发件人 ID 配置了 ArrowDB。
在 tiapp.xml 文件中设置以下行。
<property name="acs-oauth-secret-development" type="string">xxxxxxx</property>
<property name="acs-oauth-key-development" type="string">xxxxxxx</property>
<property name="acs-api-key-development" type="string">xxxxxxx</property>
<property name="acs-push-type-development" type="string">gcm</property>
<property name="acs-push-type-production" type="string">gcm</property>
<property name="acs-push-type" type="string">gcm</property>
但我收到以下消息..
[WARN] : W/com.appcelerator.aps.CCPushService: Getting GCM SenderId failed. No response area in returned JSON. Will try again in 5 seconds.
[WARN] : W/com.appcelerator.aps.CCPushService: Device Token is null.
因此,如果我错过了为 cloudpush 配置的任何内容,请告诉我。