I am working on a plugin for Flutter with background stuff.
Recently, I faced somethings about Flutter android embedding in the android_alarm_manager plugin.
A part of the README says:
For the Flutter Android Embedding V1, the background service must be provided a callback to register plugins with the background isolate.
- What exactly is Flutter android embedding V1 or V2?
- What are the differences between these two?
According to docs:
Those classes better support real world scenarios where the FlutterActivity isn't the first and only Android Activity in an application.
The embedded v2 provides better support for things like background execution (firebase messaging for instance. Checkout the changeLog).
If you are developing a plugin, you should consider starting with embedded v2. Existing packages are already migrated or migrating.