Music Player

Gitlab Status Pub Status

A music player flutter plugin that uses the native api to show the currently playing track with cover image and controls.

Example Notification

WARNING

This plugin is still in development

Prerequisites

Android:

iOS:

  • Swift support
  • iOS 10.* or higher, because of some newly introduced audio playback features

Usage

A sample project can be found in the example folder.

Additional installation steps

Android

  • Set the minSdkVersion in android/app/build.gradle to 21
  • Migrate to AndroidX
  • Add Kotlin support (In AndroidStudio "Refactor > Migrate to AndroidX..")
  • Add the FOREGROUND_SERVICE permission and the MusicPlayerService to android/app/src/main/AndroidManifest.xml (see below)
<manifest xmlns:android="..." package="...">

    <!-- Add following permission -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <application> 
        ...
        <activity>...</activity>
        
        <!-- Add the following service -->
        <service
            android:name="live.exit.musicplayer.MusicPlayerService"
            android:enabled="true" />
    </application>
</manifest>

iOS

TODO

Libraries

music_player