Skip to content

Start Audioservice on "initState" #14

@yagoliveira92

Description

@yagoliveira92

I want start the notification in app initialization, but don't play anything. I try, in the example, put this code in "initState":

@override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); connect(); AudioService.start( backgroundTask: _backgroundAudioPlayerTask, resumeOnClick: true, notificationChannelName: 'Audio Service Demo', notificationColor: 0xFF2196f3, androidNotificationIcon: 'mipmap/ic_launcher', ); }

But don't working. Anyone can help me? =D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions