I created an app that uses locale notifications. In order to set the notifications, a call is made to the backend, and a list of notifications to set is returned. I created a loop that goes through this list, and set the notifications one by one. I noticed it almost takes a second to set a notification. This is the function I call, when setting the notification:
public function sendNotification(title:String, body:String, delay:int, id:int, tickerText:String, data:String, alertAction:String = "") : void
{
if (Notifications.isSupported)
{
Notifications.service.notify(
new NotificationBuilder()
.setId(id)
.setDelay( delay )
.setAlert( tickerText )
.setTitle( title )
.setSound("sound/trigger")
.enableVibration(false)
.setCount(1)
.setBody( body )
.setPayload( data )
.build()
);
}
}
Is it possible to speed this up? Perhaps with a batch?
Try this :
Hope it will help you :)