Skip to content

Commit 94bf106

Browse files
committed
fix: Fix null object error #332
1 parent 7a6bcbc commit 94bf106

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

android/src/main/kotlin/com/pravera/flutter_foreground_task/service/ForegroundService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ForegroundService : Service() {
6161
try {
6262
// Check if the given intent is a LaunchIntent.
6363
val isLaunchIntent = (intent.action == Intent.ACTION_MAIN) &&
64-
intent.categories.contains(Intent.CATEGORY_LAUNCHER)
64+
(intent.categories?.contains(Intent.CATEGORY_LAUNCHER) == true)
6565
if (!isLaunchIntent) {
6666
// Log.d(TAG, "not LaunchIntent")
6767
return

0 commit comments

Comments
 (0)