Problems while cancelling device registration

In your documentation i found an example to cancel the registration of a device:
try{ Backendless.Messaging.unregisterDevice();}catch( BackendlessException exception ){ // either device is not registered or an error occurred during de-registration}

When my device is registered it works fine.
But if device is not registered my app is crashing, it is not going to “catch” block

java.lang.IllegalArgumentException: Device is not registered.
                                                                            at com.backendless.Messaging$3.doInBackground(
                                                                            at com.backendless.Messaging$3.doInBackground(
                                                                            at android.os.AsyncTask$
                                                                            at android.os.AsyncTask$SerialExecutor$
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(
                                                                            at java.util.concurrent.ThreadPoolExecutor$


Try catching IllegalArgumentException instead, it seems to be a drawback in the documentation.

same result, app is crashing

Can you try to wrap it with “catch Throwable” instead? This should catch every possible exception.