Multiple local notifications

Fuse 1.1.1 Build 13893
Mac OS 10.12.6

I’ve been scheduling local notifications for a while but lately I’ve seen multiple notifications coming in at the same time. This only happens in Android devices.

<App>
	<JavaScript>
		var LocalNotify = require("FuseJS/LocalNotifications");
		var Lifecycle = require('FuseJS/Lifecycle');

		Lifecycle.on("enteringBackground", function() {
		    LocalNotify.later(10, "Example", "Notification 1", "Payload", true);
		    LocalNotify.later(20, "Example", "Notification 2", "Payload", true);
		    LocalNotify.later(30, "Example", "Notification 3", "Payload", true);
		    LocalNotify.later(40, "Example", "Notification 4", "Payload", true);
		    LocalNotify.later(50, "Example", "Notification 5", "Payload", true);
		    LocalNotify.later(60, "Example", "Notification 6", "Payload", true);
		});

		Lifecycle.on("enteringForeground", function() {
		    LocalNotify.clearAllNotifications();
		});
	</JavaScript>
	<Text Alignment="Center" Value="Hello World!!" />
</App>

The previous code should send 6 notifications with 10 seconds in between. This is ok in iOS.
In android some of them stack together delivering:

Not1 in 10 Seconds

Not2 with Not3 in 30 Seconds

Not4, Not5 and Not6 in 60 Seconds.

I am pretty sure this wasn’t happening before.

Hi Luis, thanks for posting this
The code for local notifications hasnt changed in many releases. Its possible that google has tweaked their notification scheduling to checking every 30 seconds (or some other means of batching).

Maybe we need to look into exposing notification channels https://developer.android.com/preview/features/notification-channels.html

That sounds possible, I tested all the way to 0.30 where it works better but still no luck, the first 2/3 are fine but the rest come in pairs. I found this maybe it’s related (?) https://www.fusetools.com/downloads/0.29.0.8396#pushnotifications

Either way, is there a workaround or should I just stick to two local notifications?

I dont have a fuse specific workaround, sorry. I’ll add ‘channels’ to the wishlist though