thyagoluciano / flutter_radio

Radio station streaming example with ExoPlayer and Flutter.
GNU General Public License v3.0
86 stars 41 forks source link

Not Playing in Background #43

Open ikhattaab opened 4 years ago

ikhattaab commented 4 years ago

i'm using the package from this repo not pub.dev. it's working fine on Android but for IOS stops when switching to another app.

joesnarky commented 4 years ago

Are you able to play audio in the background fine with Android?

I just realized it stops playing for me maybe after 20 seconds. Perhaps its just this one phone. I have to try on another device.

maietta commented 4 years ago

This is normal. This library does not negotiate background service permission. You need to add that support into your project. I wrote some native code months ago, that does just this but not sure how it works because it doesn't require any permissions on latest versions of Android despite Android requiring background permissions.

joesnarky commented 4 years ago

I tested a few other Android devices. Old google phone and a Fire HD 10". Both had no issues playing background around with app in background and with screen turned off on the lock screen. I just had a Lenovo phone which stops after 20 seconds or so. Odd.