Exception with message cancel

Using Android SDK version : Backendless SDK v1.10 for Android, released 08.11.2014.

Doing a Message cancel() like below on the async api we get an exception.

java.lang.ClassCastException: com.backendless.messaging.MessageStatus cannot be cast to java.lang.Boolean

Backendless.Messaging.cancel(messageId, new AsyncCallback<Boolean>() {

@Override

public void handleResponse(Boolean canceled) {

}




@Override

public void handleFault(BackendlessFault fault) {

}

});

Now we are checking Backendless SDK v1.12 for Android, released 11.22.2014.

It seems to have another issue (specification inconsistency).
Could you confirm about following?

  • About for asynchronous method, the API parameter has changed as follows,
void Backendless.Messaging.cancel( String messageId, AsyncCallback&lt;Boolean&gt; responder );
=>
void Backendless.Messaging.cancel( String messageId, AsyncCallback&lt;MessageStatus&gt; responder );
  • But about for the synchronous method, the type of return vaule is still boolean.
boolean Backendless.Messaging.cancel( String messageId ) throws BackendlessException;

Are you plan to change the return value of synchronous method from boolean to MessageStatus?
Or is this a intentional difference?

Hi Mark,

We have confirmed that the problem has been corrected on Backendless SDK v1.12 for Android, released 11.26.2014.

About for the sync/async method’s return value, I will post it as “idea” category.

#I hope you can understand my English, but if you can’t, please let me know.

Regards,
Niro.

Thanks, Simon. The problem has been corrected, the callback object now will receive MessageStatus object. Complete method signature is:

Backendless.Messaging.cancel(messageId, new AsyncCallback<MessageStatus>()

We will be publishing the updated SDK early next week. Please ping me offline if you would like to try the updated build of the SDK.

Regards,
Mark