The music app I vibe coded is working fine but I wanted to improve it. So I decided to add some extra features like playing in the background so that I can control playback from notification bar. Cool right ?
I also wanted to refactor my code because It would give me huge pain if I scale it just from here. I started working on it, I fixed all errors of refactoring but when I say
flutter run
It gives me an error which forced me scratch my head for days.
The Activity class declared in your AndroidManifest.xml is wrong...
Now I'm trying to fix things in xml file which I needed to actually make change in MainActivity.kt . The only thing I needed to replace below code
class MainActivity: FlutterFragmentActivity() {}
with this
class MainActivity: AudioServiceFragmentActivity() {}
Finally I'm a bit relieved. I did learn a lot as I actually reverse engineered code, refactored so much just to find answers. Now I really need a break lol.....................