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