wasStartedInBackground method
Whether a media browser (Android Auto) started the app in the background while it was closed, through the shared engine (see the Android Auto section of the usage guide), rather than the user opening it.
An app started this way should set up its media library and action handlers, but not
activate the session or start playing until it is asked to (an item picked, a voice request):
an active session makes it the app Android Auto resumes, taking over from whatever was playing.
Android only; false elsewhere.
Implementation
Future<bool> wasStartedInBackground() {
return FlutterMediaSessionPlatform.instance.wasStartedInBackground();
}