diff --git a/packages/smooth_app/android/app/src/main/kotlin/org/openfoodfacts/app/AppMainTile.kt b/packages/smooth_app/android/app/src/main/kotlin/org/openfoodfacts/app/AppMainTile.kt index 5a9d15f6eca..1f322a39af7 100644 --- a/packages/smooth_app/android/app/src/main/kotlin/org/openfoodfacts/app/AppMainTile.kt +++ b/packages/smooth_app/android/app/src/main/kotlin/org/openfoodfacts/app/AppMainTile.kt @@ -1,5 +1,6 @@ package org.openfoodfacts.app +import android.app.PendingIntent import android.content.Intent import android.os.Build import android.service.quicksettings.Tile @@ -24,7 +25,18 @@ class AppMainTile : TileService() { flags += Intent.FLAG_ACTIVITY_NEW_TASK } - startActivityAndCollapse(intent) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + startActivityAndCollapse( + PendingIntent.getActivity( + applicationContext, + 0, + intent, + PendingIntent.FLAG_IMMUTABLE + ) + ) + } else { + startActivityAndCollapse(intent) + } } } \ No newline at end of file