From a68b82ca5a969f54920ec7909265b0e77f1e23ae Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Wed, 22 Mar 2023 14:53:15 -0700 Subject: [PATCH] [GH-139] Disable Airship from prompting for notifications (#149) --- build.gradle | 2 +- src/main/kotlin/com/mparticle/kits/MParticleAutopilot.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ee7b166..42beb7c 100644 --- a/build.gradle +++ b/build.gradle @@ -41,7 +41,7 @@ android { dependencies { compileOnly 'androidx.legacy:legacy-support-v4:1.0.0' - api 'com.urbanairship.android:urbanairship-core:16.8.1' + api 'com.urbanairship.android:urbanairship-core:16.9.0' testImplementation 'junit:junit:4.13.2' testImplementation files('libs/java-json.jar') } diff --git a/src/main/kotlin/com/mparticle/kits/MParticleAutopilot.kt b/src/main/kotlin/com/mparticle/kits/MParticleAutopilot.kt index 6895fd7..301db6f 100644 --- a/src/main/kotlin/com/mparticle/kits/MParticleAutopilot.kt +++ b/src/main/kotlin/com/mparticle/kits/MParticleAutopilot.kt @@ -21,6 +21,7 @@ class MParticleAutopilot : Autopilot() { .setNotificationIcon(preferences.getInt(NOTIFICATION_ICON_NAME, 0)) .setNotificationAccentColor(preferences.getInt(NOTIFICATION_COLOR, 0)) .setCustomPushProvider(MParticlePushProvider.instance) + .setIsPromptForPermissionOnUserNotificationsEnabled(false) if (MParticle.getInstance()?.environment == MParticle.Environment.Development) { optionsBuilder.setDevelopmentAppKey(preferences.getString(APP_KEY, null)) .setDevelopmentAppSecret(preferences.getString(APP_SECRET, null))