ZahraHeydari / MusicPlayer

Implemented using Clean Arch, MVVM, LiveData, Room, Koin, Coil, Service, Notification and ExoPlayer
Apache License 2.0
618 stars 88 forks source link

Bug: app crashes right when starting to play in background #3

Closed AndroidDeveloperLB closed 3 years ago

AndroidDeveloperLB commented 4 years ago

See attached video:

2019-12-01_22-51-17.zip

You need to add:

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

But even then, when I try to start playing, it doesn't do anything:

2019-12-01_22-53-27.zip

ZahraHeydari commented 4 years ago

Apps targeting Android Q (API 29) by default are given a filtered view into external storage. I solved this issue by adding: <manifest ... > <application android:requestLegacyExternalStorage="true" ... > ... </application> </manifest>

AndroidDeveloperLB commented 4 years ago

This isn't a proper solution, especially in a repository. It's a temporary one

AndroidDeveloperLB commented 4 years ago

Just a note: I don't like what Google is doing with the storage. It even made weirder claims and decisions on a recent video :

https://www.youtube.com/watch?v=UnJ3amzJM94&feature=youtu.be&t=369

ZahraHeydari commented 4 years ago

Thanks for sharing.

AndroidDeveloperLB commented 4 years ago

Yes, there is a lot of talk against it on reddit, and there are multiple articles about it by CommonsWare.

I have no idea what will happen, and I'm very confused by the huge amount of information that exists about it.