I added local notifications, so when my application receives a click during opening, a popup and sound still appear. It works fine on Android, but on iOS, a local notification does not appear at all.
Push notifications work great on both platforms.
This is my code in a push callback that should trigger a notification (if the application is open):
if(Display.getInstance().getCurrent() != null) { LocalNotification n = new LocalNotification(); n.setId(value); n.setAlertBody(value); n.setAlertTitle({app name}); n.setBadgeNumber(1); Display.getInstance().scheduleLocalNotification(n, System.currentTimeMillis() + 1000, LocalNotification.REPEAT_NONE); }
source share