I saw same questions like: link1 link2, but my Flutter version is newer than as in resolves or something else, so my Flutter bases on Kotlin, not Java, as I think. MainActivity exists only in kotlin directory, in Java there is only GeneratedPluginRegistrant.java
My directory to MainActivity bases in android/app/src/main/kotlin/com/name/app_name/MainActivity.kt
I tried to add my StartCmPlayerServiceAtBootReceiver.kt in directory above as in solutions in links, and added code below to AndroidManifest, which is in android/app/src/main/
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
and this before closing tag of
<receiver
android:enabled="true"
android:name=".StartCmPlayerServiceAtBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
So, are there any other solutions? Flutter version 2.2.3