Flutter firebase fcm No implementation FcmDartService#initialized
 
I'm try Firebase messaging with Android Flutter.
I'm fix this error "No implementation found for method FcmDartService#initialized".

Remove: GeneratedPluginRegistrant.registerWith(registry);

Add: FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));


OLD CODE - Application.java

package your.package.name;

import io.flutter.app.FlutterApplication;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;

public class Application extends FlutterApplication implements PluginRegistrantCallback {
  @Override
  public void onCreate() {
    super.onCreate();
    FlutterFirebaseMessagingService.setPluginRegistrant(this);
  }

  @Override
  public void registerWith(PluginRegistry registry) {
    GeneratedPluginRegistrant.registerWith(registry);
  }
}

NEW CODE - Application.java

package your.package.name;

import io.flutter.app.FlutterApplication;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;

public class Application extends FlutterApplication implements PluginRegistrantCallback {
    @Override
    public void onCreate() {
        super.onCreate();
        FlutterFirebaseMessagingService.setPluginRegistrant(this);
    }

    @Override
    public void registerWith(PluginRegistry registry) {
        FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
    }
}



    
 

Author: Engin ATALAY
Date: 16.01.2021 18:12:07
View Count: 452
 
 

COMMENTS
 
Resim Yüklenemedi
Suman Nandi
15 Ocak 2023 10:33
This is not working now. I have upgrade my plugin firebase_core:^0.5.3 and firebase_messaging: ^7.0.3 upper version not working. I want to solve this issue. I have stuck last 1 month, please help me. [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)
 
 
 
 
 
 
 
 
 
 
 
 
WRITE COMMENT
 
 
Your Name :
 
 
 
E-mail :
 
 
 
Your Message :
 
 
 
 
 
 
 
This project : ASP.NET MVC , RAZOR, Entity Framework , CSS , HTML , JQUERY(2.0.2) , AJAX the C# side-tier architecture was developed with logic.
 
Yukarı Çık