I'm experimenting with Ryan Heise's great audio packages in Flutter.
I import the Just Audio Background ("JAB") code from GitHub into Android Studio, and I run flutter pub get
where necessary to get rid of any errors in the packages.
I want to replicate the simple radio player in the file example_radio.dart
in the Just Audio package. But I need it to run in the background.
Following the setup instructions on the JAB pub.dev page, I make sure the dependencies are correct in pubspec.yaml
and I edit the Android Manifest file.
I see some unresolved classes and packages in the Manifest (see screenshot); however, the app runs. But I am not sure about this. I'm new to Flutter and am not sure how important it is to have zero errors in the Android files, because I have seen other SO comments saying to just ignore them. This I must investigate.
When I run the app, everything works fine except the audio stops when it goes into the background.
I also ran the JAB example file, and this works fine, continues to play in the background. I have tried to edit this file so that it plays just the radio stream and shows the simple metadata. I've got it running, but the UI's a mess with my naive editing.
Any pointers, advice, much appreciated.
Thanks.