Support Topics Documentation Slack YouTube Blog

Not able to send multiple push notifications

I am trying to send multiple push notifications once, but i am getting only one notification

Hi @sumanth_c,

Please provide the sample code you use to send multiple push notifications so we can reproduce your issue.

Best Regards,
Maksym

for(var i=0;i<data.length;i++){
sendPush(channel, title)
}

sendPush(channel, title){
var channel = channel,
message = title,
publishOptions = new Backendless.PublishOptions({
headers: {
“android-ticker-text”: “Your just got a push notification”,
“android-content-title”: “This is a notification title”,
“android-content-text”: “Push notifications are cool”
}
});

Backendless.Messaging.publish( channel, message, publishOptions )
.then( function( messageStatus ) {
  console.log( "message has been published, message status - " + messageStatus.status );
})

.catch( function ( error ) {
return error;
console.log( "error - " + error.message );
});
}

Thanks. We will try to reproduce and will keep you updated with a progress.

Best Regards,
Maksym

@sumanth_c What version of Android SDK do you use?
Also what version of Android OS do you use? Did you try to run on different Android OS versions?

Best Regards,
Maksym

different Android OS versions means different android devices?

Yes, try on different device with differens OS version if possible

Hi Sumanth C,

unfortunatally you sent us broken code.

Please, if you need our help, try to help us understand your problem.
We are not able to look for and fix syntax errors in someone else’s code.
Thank you for understanding.

One question: do you see message has been published, message status - scheduled in logs for each notification you send?

Regards,
Stanislaw

All messages are sending fine, but notifications are not showing in order

Ok, this means that Backendless did its work and sent all the notifications. Everything else already depends on the implementation on the client. We are powerless to help you here, I sugget you to debug your client code, try to send notifications with different content and then, if device recevied them in order, it will mean that device ignores pushes with identical content. Maybe someone from the community will help you here.