I am using Quickblox SDK Ver 2.2.5 and I am trying to unsubscribe from Quickblox Push Notification's Subscriptions.
Previously before it was working fine & now instantly from past few weeks it stopped working.
Here following is my code:-
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);
}
});
Error which I receive is:-
E/Subscriptions Errors(28923): Error:[Entity you are looking for was not found.]
I am not able to figure it out, as internet is already working and I am also logged-in to the chat because the process to final logout is in method getEverythingDone()
which is used in my above described code.
Any idea, where I am wrong or is it again Quickblox guys (Have they messed up with their Api's again)?