Error processing Push Notification

Hello,

I am trying to send a push notification from the Backendless console to an Android device. However, I get the following error in the console :

E/BackendlessBroadcastReceiver: Error processing push notification
java.lang.NullPointerException: Attempt to invoke virtual method ‘int java.lang.Integer.intValue()’ on a null object reference
at com.backendless.push.NotificationLookAndFeel.getTextColor(NotificationLookAndFeel.java:90)
at com.backendless.push.BackendlessBroadcastReceiver.handleMessage(BackendlessBroadcastReceiver.java:226)
at com.backendless.push.BackendlessBroadcastReceiver.handleIntent(BackendlessBroadcastReceiver.java:161)
at com.backendless.push.BackendlessBroadcastReceiver.onReceive(BackendlessBroadcastReceiver.java:128)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3635)
at android.app.ActivityThread.access$2000(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1877)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

From what I’ve seen in GitHub, it appears the NotificationLookAndFeel object is null?

Could you please give me some pointers regarding what I may be missing here?

Thank you very much,
Daniela

Hi Daniela,

Could you please check what version of backendless SDK you use? The latest code has no code on line 90 in NotificationLookAndFeel:

Also, could you please let me know what headers you are including with the push notification from Backendless Console?

Regards,
Mark

Hello,

Thank you for your reply! I am using version 3.0.8.1.

For the headers I am using “android-ticker-text”:“ticker text”, “android-content-title”:“title”,“android-content-title”:“content text”, as described in your documentation.

Thank you,
Daniela

Hi Lehel,

Version 3.0.8.1 is pretty outdated. Can you please try the latest one, 3.0.25?

Hello,

I have just updated the SDK, and the error is gone. However, nothing happens when I try to send a push from the console. I just get a message that the message is scheduled, but nothing arrives on the device. I am using the most basic configurations, I did not override a receiver for the push notifications. Am I still missing something?

Thank you,
Lehel

Nevermind, the notifications were just delayed.

Thank you very much for your help!!

Kind regards,

Lehel