Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background start not allowed #419

Open
petergoczan opened this issue Nov 6, 2024 · 0 comments
Open

Background start not allowed #419

petergoczan opened this issue Nov 6, 2024 · 0 comments

Comments

@petergoczan
Copy link

petergoczan commented Nov 6, 2024

Hi Everyone,
I'm integrating the Fling SDK for both controller and receiver sides for my media player application. When the TV application is in the background (after a force stop) and I start casting from mobile, I'm getting the following error:
Background start not allowed: service Intent { flg=0x10000000 cmp=my.package.name/my.package.fling.FlingPlayerService } to my.package.name/my.package.fling.FlingPlayerService from pid=16210 uid=10058 pkg=com.amazon.whisperlink.core.android startFg?=false

I've added these permissions to my manifest for TV:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

And also this:
`

    <service
        android:name=".fling.FlingPlayerService"
        android:exported="true"
        android:foregroundServiceType="mediaPlayback" />

    <meta-data
        android:name="whisperplay"
        android:resource="@xml/whisperplay" />`

Also, I'm starting the FlingPlayerService as a foregroundService. This issue is happening under the hood and I don't know what else I could do about it. When the TV app is opened and closed (but I assume is still in the memory), it gets opened when I'm starting the casting.

Please help 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant