From 8503089ccf1f46e66a45c924b30be3a9837bf99c Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 21 Dec 2024 11:00:52 +0700 Subject: [PATCH] Ask for notification permission prior to launching the cloud background service --- src/core/platforms/android/androidplatformutilities.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/platforms/android/androidplatformutilities.cpp b/src/core/platforms/android/androidplatformutilities.cpp index b4c87227d9..580b846c48 100644 --- a/src/core/platforms/android/androidplatformutilities.cpp +++ b/src/core/platforms/android/androidplatformutilities.cpp @@ -694,6 +694,9 @@ QVariantMap AndroidPlatformUtilities::sceneMargins( QQuickWindow *window ) const void AndroidPlatformUtilities::uploadPendingAttachments( QFieldCloudConnection *connection ) const { + // Request notification permission + checkAndAcquirePermissions( QStringLiteral( "android.permission.POST_NOTIFICATIONS" ) ); + QTimer::singleShot( 500, [connection]() { if ( connection ) {