Support Topics Documentation Slack YouTube Blog

Error while registering to Backendless messaging for push notification

Dear all,

I want to register my device to push notification
I done the neccery steps in Backendless and FireBase.

I using backendless 6.0.1

my method:
List channels = new ArrayList();
Backendless.Messaging.registerDevice(channels, new AsyncCallback() {
public void handleResponse(DeviceRegistrationResult response) {
Toast.makeText(context, “Device registered!”,
Log.e(TAG, "handleResponse: "+response.getDeviceToken() );

        public void handleFault(BackendlessFault fault) {
            Toast.makeText(context, "Error registering " + fault.getMessage(),
            Log.e(TAG, "handleFault: "+fault.getMessage() );

but I getting error:
Could not deserialize server response: Attempt to invoke virtual method ‘byte[] java.lang.String.getBytes()’ on a null object reference

found the problem, error in api key. you can close it