Skip to content

Background start not allowedΒ #419

@petergoczan

Description

@petergoczan

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 πŸ™

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions