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..b50b52a9b77 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 @@ -24,7 +24,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( + appContext, + 0, + intent, + PendingIntent.FLAG_IMMUTABLE + ) + ) + } else { + startActivityAndCollapse(intent) + } } } \ No newline at end of file