Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
仅Android上的Appcelerator推送通知错误_Android_Push_Appcelerator_Google Cloud Messaging_Mqtt - Fatal编程技术网

仅Android上的Appcelerator推送通知错误

仅Android上的Appcelerator推送通知错误,android,push,appcelerator,google-cloud-messaging,mqtt,Android,Push,Appcelerator,Google Cloud Messaging,Mqtt,钛版:3.1.3 我仍然在为Android使用MQTT,直到几周前一切都很好(也许直到acs上的MQTT被弃用)。但是我读到仍然可以使用MQTT(而不是gcm)。根据appcelerator上的另一篇文章,我必须在tiapp.xml中定义mqtt,但这不起作用 这是我的tiapp.xml的一部分 <property name="acs-push-type-development" type="string">mqtt</property> <property nam

钛版:3.1.3

我仍然在为Android使用MQTT,直到几周前一切都很好(也许直到acs上的MQTT被弃用)。但是我读到仍然可以使用MQTT(而不是gcm)。根据appcelerator上的另一篇文章,我必须在tiapp.xml中定义mqtt,但这不起作用

这是我的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>
“参数不能为null”看起来像是gcm响应代码。我尝试删除gcm的apiKey和发送者id,并仅保存应用程序Packagename(MQTT),但随后得到错误gcm_apiKey为null。如果我在tiapp.xml中定义mqtt,我认为push没有使用gcm?顺便说一句,在iOS上,一切都正常工作,但那里当然没有使用mqtt

  • 您正在使用的CloudPush模块版本应低于3.2.0

  • 订阅推送通知时,应将“android”指定为类型。(对于GCM,您必须使用“GCM”)

  • 然而,Appcelerator已从2014年3月15日起取消了MQTT支持。。 因此,最新的CloudPush模块将不再支持MQTT。 请参见下面的屏幕截图。您可以在ACS服务器上看到这一点。您需要将应用程序升级到GCM以解决问题,升级到GCM非常简单。我早就做过了。我建议您将应用升级到GCM支持


    请访问Appcelerator博客。

    Thx了解您的答案,CloudPush模块版本是否与使用的钛合金版本相同?如果没有,我在哪里可以检查CloudPush模块版本?我用的是钛合金3.1.3。订阅完全正确,不必使用与TiSDK相同的版本。但如果您计划继续使用MQTT,则应使用3.2.0以下的CloudPush模块。由于3.2.0本身,Appcelerator不支持MQTT。您可以更改模块版本您的tiApp.xml文件CloudPush模块低于3.2.0 ti.CloudPush请尝试将模块升级到3.x,您可以在tiApp.xml中更改它。从tiapp.xml文件中显示的listview中选择模块版本,该版本也不起作用,但用于尝试。反正我很快就要换成城市飞艇了。
    `"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"
        }, .....
    `