Add player skeleton and playback service
This introduces a dependency on audio_service and implements the playback service using that package. The UI was adapted to the new interface.
|
|
@ -50,6 +50,8 @@ android {
|
|||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
// See https://github.com/ryanheise/audio_service/blob/master/README.md#android-setup
|
||||
shrinkResources false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.johrpan.musicus">
|
||||
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:label="Musicus"
|
||||
|
|
@ -21,6 +24,18 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name="com.ryanheise.audioservice.AudioService">
|
||||
<intent-filter>
|
||||
<action android:name="android.media.browse.MediaBrowserService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver android:name="androidx.media.session.MediaButtonReceiver" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
|
|
|||
BIN
android/app/src/main/res/drawable-hdpi/ic_notification.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
android/app/src/main/res/drawable-hdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 140 B |
BIN
android/app/src/main/res/drawable-hdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
android/app/src/main/res/drawable-hdpi/ic_stop.png
Normal file
|
After Width: | Height: | Size: 102 B |
BIN
android/app/src/main/res/drawable-mdpi/ic_notification.png
Normal file
|
After Width: | Height: | Size: 485 B |
BIN
android/app/src/main/res/drawable-mdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
android/app/src/main/res/drawable-mdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 159 B |
BIN
android/app/src/main/res/drawable-mdpi/ic_stop.png
Normal file
|
After Width: | Height: | Size: 92 B |
BIN
android/app/src/main/res/drawable-xhdpi/ic_notification.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
android/app/src/main/res/drawable-xhdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 162 B |
BIN
android/app/src/main/res/drawable-xhdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
android/app/src/main/res/drawable-xhdpi/ic_stop.png
Normal file
|
After Width: | Height: | Size: 114 B |
BIN
android/app/src/main/res/drawable-xxhdpi/ic_notification.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
android/app/src/main/res/drawable-xxhdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 202 B |
BIN
android/app/src/main/res/drawable-xxhdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 547 B |
BIN
android/app/src/main/res/drawable-xxhdpi/ic_stop.png
Normal file
|
After Width: | Height: | Size: 196 B |
BIN
android/app/src/main/res/drawable-xxxhdpi/ic_notification.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
android/app/src/main/res/drawable-xxxhdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
android/app/src/main/res/drawable-xxxhdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 488 B |
BIN
android/app/src/main/res/drawable-xxxhdpi/ic_stop.png
Normal file
|
After Width: | Height: | Size: 244 B |