在Android Appcelerator的推送通知仅错误 [英] Appcelerator Push Notification error on Android only

查看:311
本文介绍了在Android Appcelerator的推送通知仅错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

钛版本:3.1.3

我仍在使用MQTT Android和一切工作很好,直到几个星期前(也许直到ACS MQTT去了precated)。但我读了,可以仍然使用MQTT(而不是GCM)。据对Appcelerator的另一篇文章我只是在tiapp.xml定义MQTT,但这不起作用。

I'm still using MQTT for Android and everything worked fine until a few weeks ago (maybe until mqtt on acs got deprecated). But I read that it is possible to still use MQTT (instead of gcm). According to another post on appcelerator I just had to define mqtt in the tiapp.xml, but this does not work.

这是我的tiapp.xml的一部分

This is part of my tiapp.xml

<property name="acs-push-type-development" type="string">mqtt</property>
<property name="acs-push-type-production" type="string">mqtt</property>
<property name="acs-push-type" type="string">mqtt</property>
...
<module platform="android" version="2.3.2">ti.cloudpush</module>
<module platform="android" version="2.1.2">ti.map</module>
<module platform="commonjs" version="2.3.7">ti.cloud</module>

这是我从Appcelerator的日志中获取的:

That is what I get from the appcelerator logs:

`"response": {"push_log_details": [
    {
    "created_at": "2014-05-12T13:02:35.389Z",
    "updated_at": "2014-05-12T13:02:31.094Z",
    "type": "android",
    "android_type": 1,
    "app_id": "52724d7cd72ec85152039256",
    "channel": "stickin",
    "_id": "5370c66be511ea7ab99881d4",
    "token": "ND1M2IX8RU8RGJDICW13I9V",
    "push_id": "5370c6641316e90db2311567",
    "send_status": 2,
    "sent_at": "2014-05-12T13:02:30.996Z",
    "error_message": "argument cannot be null",
    "msg_id": "fa89cfb6-f2d2-4222-b442-a47d2625b419"
    },
    {
    "created_at": "2014-05-12T13:02:35.389Z",
    "updated_at": "2014-05-12T13:02:31.094Z",
    "type": "android",
    "android_type": 1,
    "app_id": "52724d7cd72ec85152039256",
    "channel": "stickin",
    "_id": "5370c66be511ea7ab99881d6",
    "token": "ND13ST3OA0MHE079H6EYV8P",
    "push_id": "5370c6641316e90db2311567",
    "send_status": 2,
    "sent_at": "2014-05-12T13:02:30.996Z",
    "error_message": "argument cannot be null",
    "msg_id": "77fc5c7f-9703-46e5-a433-7be0796421f2"
    }, .....
`

参数不能为空似乎是一个GCM响应code。我试图消除GCM的apiKey和发件人ID和仅保存应用程序软件包名(MQTT),但后来我得到的错误gcm_apiKey为空。我想推不使用GCM,如果我在tiapp.xml定义MQTT?顺便说一句,iOS上的一切工作正常,但当然MQTT不使用那里。

"argument cannot be null" seems like a gcm response code. I tried removing apiKey and sender id of gcm and to only save the Application Packagename (MQTT), but then I get the error gcm_apiKey is null. I thought push is not using gcm if I define mqtt in the tiapp.xml? By the way, on iOS everything is working fine, but of course mqtt is not used there.

推荐答案

检查以下


  1. 您使用的是应低于3.2.0 CloudPush模块版本

  1. CloudPush module version you are using should be below 3.2.0

而订阅推送通知,您应该指定Android的类型。 (GCM中的情况下,你必须使用GCM')

You should specify 'android' as type while subscribing to the push notification. (in the case of GCM, you have to use 'gcm')

然而 Appcelerator的已取消从2014年3月15日的MQTT支持。
所以最新的CloudPush模块将不会支持MQTT了。
见下面的截图。您可能会看到这个在ACS服务器上。您需要升级您的应用程序GCM来解决的问题,并升级到GCM是pretty简单。我已经做得比较早了。我建议你​​应该你的应用程序升级到GCM支持。

However Appcelerator has removed the MQTT support from March 15th 2014.. So latest CloudPush modules will not support MQTT anymore. See the below screenshot. You may see this on the ACS server. You need to upgrade your app to GCM to fix the issues and upgrading to GCM is pretty simple. I had already done it earlier. I suggest you should upgrade your app to GCM support.

还行<一个href=\"http://www.appcelerator.com/blog/2013/08/android-push-notification-de$p$pcating-mqtt-in-favor-of-gcm/\"相对=nofollow> Android的推送通知:德precating MQTT赞成Appcelerator的博客GCM 的

这篇关于在Android Appcelerator的推送通知仅错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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