Support Topics Documentation Slack YouTube Blog

Can I use AS/Backendless SDK to recieve push notifications in Android/IOS?

(Victor Martinez) #1

Also, Is it possible to recieve silent notifications (no UI “alert”), just to send data to the app?

Thanks in advance.

(Mark Piller) #2

Yes, you can use the AS SDK to receive push notifications.

Support for silent notifications is going to be available in the upcoming release, but it will be only in the native SDKs (not in the AS one).


(Victor Martinez) #3

Hi Mark,

Thank you for your quick response.

Silent notifs are a big deal, it’s a pity they will not be in AS… :frowning:

Anyway, I’ve tried unsuccessfully to do a push notif, but I could not register the device. I don’t know if i’ve done all steps because AS doc is a little scattered. This is my code:

trace("Registering push.");
Backendless.initApp( "14EF85C9-XXXX-XXXX-XXXX-XXXXXXXX", "3A1D0078-XXXX-XXXX-XXXX-XXXXXXXX", "v1" );

var responder:IResponder = new mx.rpc.Responder(
      function( event:ResultEvent ):void {
         trace("Registry result = "+event.statusCode);
         var registration:DeviceRegistration = event.result as DeviceRegistration;
         trace("Device token = "+registration.deviceToken);

      function faultEvent( fault:FaultEvent ):void {
         trace("Error registering Push: "+fault);

var deviceRegistration:DeviceRegistration = new DeviceRegistration();
deviceRegistration.gcmSenderId = "59XXXXXXXX";
deviceRegistration.channels = [ "My_Channel" ];

Backendless.Messaging.registerDevice(deviceRegistration, receivedPushNotification, responder);
trace("push registered?");

In the console I only get these messages:

Registering push.
push registered?

No reference to the OK or KO messages, exceptions, other error messages, nothing else…

I’ve change android permissions, added libs PN, rpc/framework and locale.

Thanks in advance!

(Roberto) #4

Hi, same here…The example on documentation uses

Backendless.MessagingService.registerDevice(deviceRegistration, receivedPushNotification, responder);

but this throws a compilation error “property not found”.
This compiles right but does nothing…

Backendless.Messaging.registerDevice(deviceRegistration, receivedPushNotification, responder);

(Roberto) #5

ok, I managed to register on iOS.

First I included the modified class on this post:

Then I used this method:

Backendless.Messaging.registerDevice(deviceRegistration, receivedPushNotification, responder);

And last add this to the App XML manifest:


(Sergey Chupov) #6

Hi Roberto,

Maybe if you could prepare a pull request to our AS SDK with your fixes, it would be just perfect :slight_smile:

(Roberto) #7

hi Sergey, to be honest, I don’t know how to do that :wink:

But you can ask to Tushar Scientific, owner of the code and the original post.


(Roberto) #8

Hi Victor, did you managed to implement this on an Android device? I managed to register but not to get the push notifications…