Skip to content

Commit 6316689

Browse files
simonphamDev-hwang
authored andcommitted
feat: add mediaProcessing foreground service type
1 parent 27d5dfa commit 6316689

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

android/src/main/kotlin/com/pravera/flutter_foreground_task/models/ForegroundServiceTypes.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ data class ForegroundServiceTypes(val value: Int) {
7070
10 -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE else null
7171
11 -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE else null
7272
12 -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) ServiceInfo.FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED else null
73+
13 -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING else null
7374
else -> null
7475
}
7576
}

lib/models/foreground_service_types.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class ForegroundServiceTypes {
4949
/// Reserved for system applications and specific system integrations, to continue to use foreground services.
5050
static const systemExempted = ForegroundServiceTypes(12);
5151

52+
/// Service for performing time-consuming operations on media assets, like converting media to different formats.
53+
static const mediaProcessing = ForegroundServiceTypes(13);
54+
5255
/// The raw value of [ForegroundServiceTypes].
5356
final int rawValue;
5457
}

0 commit comments

Comments
 (0)