diff --git a/acra-core/src/main/java/org/acra/interaction/ReportInteractionExecutor.kt b/acra-core/src/main/java/org/acra/interaction/ReportInteractionExecutor.kt index 29c11caec4..e61241fa3b 100644 --- a/acra-core/src/main/java/org/acra/interaction/ReportInteractionExecutor.kt +++ b/acra-core/src/main/java/org/acra/interaction/ReportInteractionExecutor.kt @@ -18,6 +18,7 @@ package org.acra.interaction import android.content.Context import org.acra.config.CoreConfiguration import org.acra.log.debug +import org.acra.log.warn import org.acra.plugins.loadEnabled import java.io.File import java.util.concurrent.ExecutionException @@ -49,6 +50,7 @@ class ReportInteractionExecutor(private val context: Context, private val config sendReports = sendReports and future.get() } catch (ignored: InterruptedException) { } catch (e: ExecutionException) { + warn(e) { "Report interaction threw exception, will be ignored." } //ReportInteraction crashed, so ignore it break } diff --git a/acra-notification/src/main/AndroidManifest.xml b/acra-notification/src/main/AndroidManifest.xml index fc54d1ba53..38812566df 100644 --- a/acra-notification/src/main/AndroidManifest.xml +++ b/acra-notification/src/main/AndroidManifest.xml @@ -16,6 +16,7 @@ + = Build.VERSION_CODES.M) { + PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE + } else { + PendingIntent.FLAG_UPDATE_CURRENT + } + private fun getSendIntent(context: Context, config: CoreConfiguration, reportFile: File): PendingIntent { val intent = Intent(context, NotificationBroadcastReceiver::class.java) intent.action = INTENT_ACTION_SEND intent.putExtra(LegacySenderService.EXTRA_ACRA_CONFIG, config) intent.putExtra(EXTRA_REPORT_FILE, reportFile) - return PendingIntent.getBroadcast(context, ACTION_SEND, intent, PendingIntent.FLAG_UPDATE_CURRENT) + return PendingIntent.getBroadcast(context, ACTION_SEND, intent, pendingIntentFlags) } private fun getDiscardIntent(context: Context): PendingIntent { val intent = Intent(context, NotificationBroadcastReceiver::class.java) intent.action = INTENT_ACTION_DISCARD - return PendingIntent.getBroadcast(context, ACTION_DISCARD, intent, PendingIntent.FLAG_UPDATE_CURRENT) + return PendingIntent.getBroadcast(context, ACTION_DISCARD, intent, pendingIntentFlags) } private fun getSmallView(context: Context, notificationConfig: NotificationConfiguration, sendIntent: PendingIntent, discardIntent: PendingIntent): RemoteViews { diff --git a/web/docs/Interactions.mdx b/web/docs/Interactions.mdx index 9e04d81af5..782517a159 100644 --- a/web/docs/Interactions.mdx +++ b/web/docs/Interactions.mdx @@ -127,6 +127,11 @@ import NotificationImage from '@site/static/img/captures/notification.png' A notification is shown. A report will only be sent if the user agrees. +:::info +If the user has disabled this notification channel in the Android settings, no report will be sent! +This may be the default setting. It is your own responsibility to ask the user to allow these notifications. +::: + ```kotlin