运行Bluemix bluelist-push android示例时出错

时间:2015-09-01 13:13:41

标签: android node.js ibm-cloud

我正在按照本教程执行bluelist-push演示:

http://www.ibm.com/developerworks/library/mo-android-push-app/index.html

一切正常,但如果一个设备中的列表更改,则其他设备无法收到通知。

以下是logcat中的错误:

  

09-01 18:39:10.415 17896-18359 / com.ibm.bluelist I / MainActivity:Response Body:无法POST / eta-chat / v1 / apps / 3ab78df7-3b35-402e-b45e-2fccf39ad3bc / notifyOtherDevices < / p>      

09-01 18:39:10.416 17896-18359 / com.ibm.bluelist I / MainActivity:   来自notifyOtherDevices的响应状态:404

我的应用程序运行于:http://eta-chat.mybluemix.net/

1 个答案:

答案 0 :(得分:0)

The request is 404ing when attempting to send the POST request to your Node.js app. Most likely because the endpoint does not exist.

Please ensure you have configured your app.js to include your appID and appRoute along with the notifyOtherDevices endpoint implementation.

Once you have confirmed the above, cf push the app to your Bluemix runtime and you should not run into this problem anymore.

Lastly make sure you have registered a device to the Push service. Attempting to notify an empty list of devices may cause a 404 as well.