I have FCM configuration in my app, and its working fine until I invoke my background handler in the app background running state, I got that
Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@7d7493b) but could not find and invoke the GeneratedPluginRegistrant.
but when I tried to register manually using
flutterEngine?.getPlugins()?.add(FirebaseMessagingPlugin())
I got that the FCM already registered with this engine, and then the notifications never been received
this is how I call my Background handler:
if (flutterEngine == null) {
handler?.let { callbackRawHandle ->
flutterEngine = FlutterEngine(contextm).also { engine ->
val callbackInformation =
FlutterCallbackInformation.lookupCallbackInformation(callbackRawHandle)
engine.dartExecutor.executeDartCallback(
DartExecutor.DartCallback(
contextm!!.getAssets(),
FlutterMain.findAppBundlePath(),
callbackInformation
)
)
}
}
}