简体   繁体   中英

Unable to get device token with ti.cloudpush titanium module?

I tried to get device token with ti.cloudpush module in titanium with 4.1.0.GA sdk with Appcelerator Studio 4.3.3.

I created google API project with server key and configured ArrowDB in my appcelerator account with GCM API Key and GCM Sender ID.

Set below lines in tiapp.xml file.

<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>

But I am getting below messages..

[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.

So please let me know if i missed anything to configure for cloudpush.

This error occurs, if your GCM sender ID is not properly configured in the ArrowDB. Make sure you follow the below instruction properly.

  1. Go to https://platform.appcelerator.com/
  2. In apps/ search your appname there and open it.
  3. Click Arrow on the left the app name comes on the right select the app name.
  4. This in ArrowDB portal, Go to push notification on the left. On the right on top left select your environment, for your case it's development.
  5. Now in the Android push tab. make sure the GCM API Key and GCM Sender ID is there and click save button.

This should work for you. ALso make sure you have a user created in your ArrowDB and the cloudpush module is configured in your tiapp.xml.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM