我正在使用Quickblox SDK Ver 2.2.5,我正在尝试取消订阅Quickblox Push Notification的订阅。
之前它工作正常&现在,几个星期后它立即停止了工作。
以下是我的代码: -
QBMessages.getSubscriptions(new QBEntityCallbackImpl<ArrayList<QBSubscription>>() {
@Override
public void onSuccess(
ArrayList<QBSubscription> subscriptions,
Bundle args) {
String deviceId = ((TelephonyManager) c
.getSystemService(Context.TELEPHONY_SERVICE))
.getDeviceId();
for (QBSubscription subscription : subscriptions) {
if (subscription.getDevice().getId()
.equals(deviceId)) {
QBMessages.deleteSubscription(
subscription.getId(),
new QBEntityCallbackImpl<Void>() {
@Override
public void onSuccess() {
Log.e("LOGOUT",
"GCM subscription removed from QB - successfully");
getEverythingDone();
}
@Override
public void onError(
List<String> errors) {
Log.e("LOGOUT",
"Error:"
+ errors);
}
});
break;
}
}
/** Added By Harpreet **/
unregisterForC2DM(c);
preferences.setdeviceToken("");
}
@Override
public void onError(List<String> errors) {
getEverythingDone();
Log.e("Subscriptions Errors", "Error:" + errors);
}
});
我收到的错误是: -
E/Subscriptions Errors(28923): Error:[Entity you are looking for was not found.]
我无法理解,因为互联网已经在运行,我也登录了聊天,因为最终注销的过程是方法 getEverythingDone()
,这是在上面描述的代码中使用。
任何想法,我错了,或者又是Quickblox的家伙(他们再次搞砸了他们的Api&#39;)