-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Within a native app in Kotlin/Java, the flutter code is started after the login page. That code receives message from firebase which in turn create notification with the simple below code:
sl<FlutterLocalNotificationsPlugin>().show(id, title, body, platformChannelSpecifics, payload: payload);
Platform specifics on Android are as follows:
AndroidNotificationDetails androidPlatformChannelSpecifics = const AndroidNotificationDetails(
"COMPANY",
"Company notifications",
channelDescription: "Notifications for new messages",
importance: Importance.defaultImportance,
priority: Priority.defaultPriority,
icon: "app_icon",
channelAction: AndroidNotificationChannelAction.update,
);
When tapping those notifications the app is re-created from scratch back to login page instead of being brought to front. Flutter code doesn't get the payload ever.
Even if the app is the top visible app and being used by user, tapping the notification recreates it!
What can I do to avoid that ?
EDIT: Tapping the notification launches the only activity flagged with "LAUNCHER", hence back to login page.
OS acts as if app is in background and reports this: Activity start ONLY allowed by BAL_ALLOW_NON_APP_VISIBLE_WINDOW
Where/how can I specify the notification intent to use ?