Support Topics Documentation Slack YouTube Blog

Push notifications are not received

(Luca Terzi) #1

My android devices are not receiving any push notifications. They do register them in the MainActivity but when I try to send a message from the console they never receive anything. Also the “Messages” tab in the console is always empty.

I initialize the app through: Backendless.initApp( this, BackendSettings.APPLICATION_ID, BackendSettings.ANDROID_SECRET_KEY, BackendSettings.VERSION ); in the SplashScreen activity, then I register the device in the MainActivty:
String gcmSenderID = “278786507357”;
Backendless.Messaging.registerDevice(gcmSenderID, new AsyncCallback<Void>() {
public void handleResponse(Void aVoid) {
Log.i(“Push”, “device registered”);
public void handleFault(BackendlessFault backendlessFault) {
Log.e(“app”, "server error " + backendlessFault.getMessage());
I also created a PushNotifications class (the file attached) but is never called… What am I doing wrong?

Thank you very much.

(Alexandr Navara) #2

Hello, Luca!

Do you see the registered devices on “devices” tab?

(Luca Terzi) #3

Hi, yes, I see the devices (the file attached).

(Alexandr Navara) #4

Make sure that you send all required headers when publishing notification through console. I mean “android-content-text”, “android-content-title”, “android-ticker-text”.

(Luca Terzi) #5

I used this:
“android-ticker-text”:“ticker text”, “android-content-title”:“content title”, “android-content-text”:“content text”
in the header section in the console.

(Alexandr Navara) #6

Yes, it looks right.

Try to generate messaging code sample from backendless console and check out if it works for you.

(Luca Terzi) #7

Thanks for the suggestion, I never tried it before, I’ll let you know something as soon as I can try. Thanks for now!

(Luca Terzi) #8

So, I couldn’t manage to make the messaging code semple generate but I just noticed that when I send a push notification retrieve an error in android studio (attached). Any idea what can it be? Thanks.

(Arthur Dzidzoiev) #9

Assigned tag BKNDLSS-13367

(Alexandr Navara) #10

Hello, Luca!

This issue has been fixed. Soon it would be available in maven repo.
For now please download and use library from github:

(Luca Terzi) #11

Thank you very much!