flutter_radio icon indicating copy to clipboard operation
flutter_radio copied to clipboard

Not Playing in Background

Open ikhattaab opened this issue 5 years ago • 3 comments

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.

ikhattaab avatar Feb 11 '20 22:02 ikhattaab

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.

joesnarky avatar Apr 26 '20 06:04 joesnarky

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.

maietta avatar Apr 26 '20 06:04 maietta

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.

joesnarky avatar Apr 28 '20 18:04 joesnarky