Hi,
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>() { @Override
public void handleResponse(Void aVoid) {
Log.i(“Push”, “device registered”);
} @Override
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?
Make sure that you send all required headers when publishing notification through console. I mean “android-content-text”, “android-content-title”, “android-ticker-text”.
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.
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.