android 15 / api 35 todo review
This commit is contained in:
parent
0cbe3d8b1d
commit
c4777aec61
2 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
<!-- to access media with original metadata with scoped storage (API >=29) -->
|
||||
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
|
||||
<!-- to provide a foreground service type, as required by Android 14 (API 34) -->
|
||||
<!-- TODO TLAD [Android 15 (API 35)] use `FOREGROUND_SERVICE_MEDIA_PROCESSING` -->
|
||||
<uses-permission
|
||||
android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"
|
||||
tools:ignore="SystemPermissionTypo" />
|
||||
|
@ -258,6 +259,7 @@
|
|||
</receiver>
|
||||
|
||||
<!-- anonymous service for analysis worker is specified here to provide service type -->
|
||||
<!-- TODO TLAD [Android 15 (API 35)] use `mediaProcessing` -->
|
||||
<service
|
||||
android:name="androidx.work.impl.foreground.SystemForegroundService"
|
||||
android:foregroundServiceType="dataSync"
|
||||
|
|
|
@ -176,6 +176,7 @@ class AnalysisWorker(context: Context, parameters: WorkerParameters) : Coroutine
|
|||
// from Android 14 (API 34), foreground service type is mandatory
|
||||
// despite the sample code omitting it at:
|
||||
// https://developer.android.com/guide/background/persistent/how-to/long-running
|
||||
// TODO TLAD [Android 15 (API 35)] use `FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING`
|
||||
val type = ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC
|
||||
ForegroundInfo(NOTIFICATION_ID, notification, type)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue