包名: - debug 使用 com.lxh.qingting_player.dev(应用名"清听 Dev"),可与 release 并存 - release 保持 com.lxh.qingting_player - Android 包名每一段必须以字母开头,因此用 .dev 而非 _dev - AGP 9 需显式开启 buildFeatures.resValues;移除 manifest 中已废弃的 package 属性 元数据(两个独立原因叠加): 1. song_key 之前用 String.hashCode / 本地临时文件 mtime,都不稳定; 2. songs.remote_path 存的是完整 URL,而所有查询都用相对路径(song.id), getSongByPath 永远 miss,UI 只能回退到文件名。 - 新增 utils/song_key.dart:songKeyFor(url,size)=md5(url|size),跨进程稳定 - metadata_service: remote_path 改存 fileId(相对路径),并改用稳定 song_key - audio_service / file_provider: 同步使用稳定键 - 数据库升级 v5:清空 songs / metadata_cache(可再生缓存;歌单与收藏按路径存储,不受影响) - device-check.ps1: 支持 -Package,默认校验 dev 包,启动组件改为向 PackageManager 解析 验证:两次独立 dart 进程 song_key 输出一致;真机 debug/release 并存安装,单实例自检通过。
83 lines
3.8 KiB
XML
83 lines
3.8 KiB
XML
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||
<!-- package 由 build.gradle.kts 的 namespace / applicationId 决定;AGP 9 已忽略这里的 package 属性 -->
|
||
<!-- 权限 -->
|
||
<uses-permission android:name="android.permission.INTERNET" />
|
||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||
|
||
<application
|
||
android:name="${applicationName}"
|
||
android:icon="@mipmap/ic_launcher"
|
||
android:label="@string/app_name"
|
||
android:usesCleartextTraffic="true"
|
||
android:foregroundServiceType="mediaPlayback">
|
||
<activity
|
||
android:name=".MainActivity"
|
||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||
android:exported="true"
|
||
android:hardwareAccelerated="true"
|
||
android:launchMode="singleTop"
|
||
android:taskAffinity=""
|
||
android:theme="@style/LaunchTheme"
|
||
android:windowSoftInputMode="adjustResize">
|
||
<meta-data
|
||
android:name="io.flutter.embedding.android.NormalTheme"
|
||
android:resource="@style/NormalTheme" />
|
||
<intent-filter>
|
||
<action android:name="android.intent.action.MAIN" />
|
||
<category android:name="android.intent.category.LAUNCHER" />
|
||
</intent-filter>
|
||
</activity>
|
||
<!-- ⭐ AudioService(不加 meta-data) -->
|
||
<service
|
||
android:name="com.ryanheise.audioservice.AudioService"
|
||
android:exported="true"
|
||
android:foregroundServiceType="mediaPlayback">
|
||
<intent-filter>
|
||
<action android:name="android.media.browse.MediaBrowserService" />
|
||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||
</intent-filter>
|
||
</service>
|
||
<!-- Don't delete the meta-data below.
|
||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||
<!-- ⭐ MediaButtonReceiver -->
|
||
<receiver
|
||
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
|
||
android:exported="true">
|
||
<intent-filter>
|
||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||
</intent-filter>
|
||
</receiver>
|
||
|
||
<!-- ⭐ FileProvider -->
|
||
<provider
|
||
android:name="androidx.core.content.FileProvider"
|
||
android:authorities="${applicationId}.fileprovider"
|
||
android:exported="false"
|
||
android:grantUriPermissions="true">
|
||
<meta-data
|
||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||
android:resource="@xml/file_paths" />
|
||
</provider>
|
||
|
||
<meta-data
|
||
android:name="flutterEmbedding"
|
||
android:value="2" />
|
||
</application>
|
||
<!-- Required to query activities that can process text, see:
|
||
https://developer.android.com/training/package-visibility and
|
||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||
|
||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||
<queries>
|
||
<intent>
|
||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||
<data android:mimeType="text/plain"/>
|
||
</intent>
|
||
</queries>
|
||
</manifest>
|