I'm a CodeNameOne beginner. I'm trying to make a local notification, it doesn't seem to work,I don't get anything displayed. here's the start function. Is there anything missing? Should I add variables in the build settings?
public void start() {
if(current != null){
current.show();
return;
}
Form hi = new Form("Hi World", BoxLayout.y());
hi.add(new Label("Hi World"));
hi.show();
LocalNotification n = new LocalNotification();
n.setId("demo-notification");
n.setAlertBody("It's time to take a break and look at me");
n.setAlertTitle("Break Time!");
//n.setAlertSound("/notification_sound_beep-01a.mp3");
// alert sound file name must begin with notification_sound
Display.getInstance().scheduleLocalNotification(
n,
System.currentTimeMillis() + 10 * 1000, // fire date/time
LocalNotification.REPEAT_MINUTE // Whether to repeat and what frequency
);
}