先commit,测下控制中心

This commit is contained in:
2026-08-21 23:44:58 +08:00
parent 75205f45af
commit 6083411055
5 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ plugins {
}
android {
namespace = "com.example.qt_player"
namespace = "com.lxh.qingting_player"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
@@ -15,7 +15,7 @@ android {
}
defaultConfig {
applicationId = "com.example.qt_player"
applicationId = "com.lxh.qingting_player"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
@@ -1,4 +1,4 @@
package com.example.qt_player
package com.lxh.qingting_player
import android.os.Build
import android.os.Bundle
+3
View File
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@drawable/ic_previous,@drawable/ic_next,@drawable/ic_play,@drawable/ic_pause" />
+3 -3
View File
@@ -20,20 +20,20 @@ class PlaybackStateManager {
// lib/audio/playback_state_manager.dart
audio_service.PlaybackState get playbackState {
final playControl = audio_service.MediaControl(
androidIcon: _playing ? 'drawable/ic_pause' : 'drawable/ic_play',
androidIcon: _playing ? '@drawable/ic_pause' : '@drawable/ic_play',
label: _playing ? '暂停' : '播放',
action: audio_service.MediaAction.playPause,
);
final controls = [
audio_service.MediaControl(
androidIcon: 'drawable/ic_previous', // 上一首
androidIcon: '@drawable/ic_previous', // 上一首
label: '上一曲',
action: audio_service.MediaAction.skipToPrevious,
),
playControl,
audio_service.MediaControl(
androidIcon: 'drawable/ic_next', // 下一首
androidIcon: '@drawable/ic_next', // 下一首
label: '下一曲',
action: audio_service.MediaAction.skipToNext,
),
+1 -1
View File
@@ -258,7 +258,7 @@ class _QTPlayerAppState extends State<QTPlayerApp> {
await audio_service.AudioService.init(
builder: () => _audioHandler!,
config: const audio_service.AudioServiceConfig(
androidNotificationChannelId: 'com.example.qt_player.music',
androidNotificationChannelId: 'com.lxh.qingting_player.music',
androidNotificationChannelName: '清听音乐播放',
androidNotificationOngoing: true,
androidStopForegroundOnPause: true,