Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter - Automatically run the application when notification received from FCM (without clicking it)

I'm developing a delivery app, when the client orders something i want the supplier app to open up on screen with 2 buttons to accept or decline the order.

its easy to do when the supplier clicks the notification (onLaunch and onResume configuration), but i want it to happen without their interaction.

Something like when someone calls you on whatsapp or FB messanger.

is this achievable ? couldnt find such a thing in flutter.

like image 678
user2962142 Avatar asked May 08 '20 19:05

user2962142


1 Answers

https://pub.dev/packages/flutter_local_notifications

      AndroidNotificationDetails(
                      'full screen channel id',
                      'full screen channel name',
                      'full screen channel description',
                      priority: Priority.high,
                      importance: Importance.high,
                      fullScreenIntent: true),

this will open app for android

like image 178
mohamed nasser Avatar answered Nov 20 '22 20:11

mohamed nasser