【发布时间】:2015-06-24 20:13:15
【问题描述】:
按照 UrbanAirship 文档中的说明,我需要在 Android 中的演示应用上使用这行代码将 TagGroup 添加到 namedUser
airship.getPushManager().getNamedUser().setId("123456");
airship.getPushManager().getNamedUser().editTagGroups().addTag("loyalty", "elite").apply();
但是,LogCat 显示此错误:
D/UrbanAirshipDemo - UALib﹕ Received a response for tag groups: Response: ResponseBody: ResponseHeaders: {null=[HTTP/1.1 400 Bad Request], Connection=[close, Transfer-Encoding], Content-Type=[application/vnd.urbanairship+json; version=3], Date=[Wed, 24 Jun 2015 20:02:06 GMT], Transfer-Encoding=[chunked], X-Android-Received-Millis=[1435176126629], X-Android-Response-Source=[NETWORK 400], X-Android-Sent-Millis=[1435176126427]} ResponseMessage: Bad Request Status: 400
E/UrbanAirshipDemo - UALib﹕ Update tag groups failed with status: 400
E/UrbanAirshipDemo - UALib﹕ Both add & remove fields are present and the intersection of the tags in these fields is not empty.
他们的 API 有什么奇怪的地方吗?来自这里的说明:http://docs.urbanairship.com/platform/android.html#named-user-tag-groups
只是简单的实现,但他们的 API 返回 400。推送通知工作正常
【问题讨论】: