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
)
)
}
}
}
The answer is here FCM/GitHub I asked the same question for FCM Developers, And the new update should solve this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.