See also closed topic
I would add my solution to that post but it is now closed for comments.
Experience an issue on build where audioservice no longer worked if main activity became a fragmented activity.
The solutions in the end was on the audioservice page itself: https://pub.dev/packages/audio_service , see ‘Integration as a FragmentActivity‘
In the end this MainActivity.kt worked to resolve the issue for me:
package com.something.app
import com.ryanheise.audioservice.AudioServiceFragmentActivity
class MainActivity: AudioServiceFragmentActivity() {
}
No changes were required in the AndroidManifest, the activity name still is android:name=".MainActivity"
Hope this helps, I busted my skull on this one (and Claude’s, and Grok’s, ...)
