Omar Shamali
Blog

Android Emulators Recieve and Show Remote Push Notifications

Android Emulators Recieve and Show Remote Push Notifications

Android emulators can actually show notifications.

Make sure to turn on notifications of the app in the phone settings. 

Also, ask for permission, by using this plugin: permission_handler

then in your main.dart:

main() async {
  
  //.......
  WidgetsFlutterBinding.ensureInitialized();
  await Permission.notification.isDenied.then((value) {
    if (value) {
      Permission.notification.request();
    }
  });

here is a proof:

android emulator working push notifications

Share