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
According to docs:
In order to better support the execution environments of adding Flutter to an existing project, the old Android platform-side wrappers hosting the Flutter runtime at io.flutter.app.FlutterActivity and their associated classes are now deprecated. New wrappers at io.flutter.embedding.android.FlutterActivity and associated classes now replace them.
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.