diff --git a/android/src/main/java/io/customer/reactnative/sdk/CustomerIOReactNativeInstance.kt b/android/src/main/java/io/customer/reactnative/sdk/CustomerIOReactNativeInstance.kt index 9f51967d..451e4bfc 100644 --- a/android/src/main/java/io/customer/reactnative/sdk/CustomerIOReactNativeInstance.kt +++ b/android/src/main/java/io/customer/reactnative/sdk/CustomerIOReactNativeInstance.kt @@ -7,7 +7,7 @@ import io.customer.messaginginapp.ModuleMessagingInApp import io.customer.messaginginapp.type.InAppEventListener import io.customer.messagingpush.MessagingPushModuleConfig import io.customer.messagingpush.ModuleMessagingPushFCM -import io.customer.messagingpush.config.NotificationClickBehavior +import io.customer.messagingpush.config.PushClickBehavior import io.customer.reactnative.sdk.constant.Keys import io.customer.reactnative.sdk.extension.* import io.customer.sdk.CustomerIO @@ -100,10 +100,10 @@ object CustomerIOReactNativeInstance { ?.takeIfNotBlank() ?.let { value -> val behavior = kotlin.runCatching { - enumValueOf(value) + enumValueOf(value) }.getOrNull() if (behavior != null) { - setNotificationClickBehavior(notificationOnClickBehavior = behavior) + setPushClickBehavior(pushClickBehavior = behavior) } } }.build(), diff --git a/android/src/main/java/io/customer/reactnative/sdk/constant/Keys.kt b/android/src/main/java/io/customer/reactnative/sdk/constant/Keys.kt index f7e38b31..fe9850e4 100644 --- a/android/src/main/java/io/customer/reactnative/sdk/constant/Keys.kt +++ b/android/src/main/java/io/customer/reactnative/sdk/constant/Keys.kt @@ -15,7 +15,7 @@ internal object Keys { const val AUTO_TRACK_PUSH_EVENTS = "autoTrackPushEvents" const val BACKGROUND_QUEUE_MIN_NUMBER_OF_TASKS = "backgroundQueueMinNumberOfTasks" const val BACKGROUND_QUEUE_SECONDS_DELAY = "backgroundQueueSecondsDelay" - const val PUSH_CLICK_BEHAVIOR = "androidPushClickBehavior" + const val PUSH_CLICK_BEHAVIOR = "pushClickBehaviorAndroid" } object PackageConfig { diff --git a/src/CustomerioConfig.tsx b/src/CustomerioConfig.tsx index 8e139ae7..8d444a33 100644 --- a/src/CustomerioConfig.tsx +++ b/src/CustomerioConfig.tsx @@ -1,5 +1,5 @@ import { CioLogLevel, Region } from './CustomerioEnum'; -import { AndroidPushClickBehavior } from './types'; +import { PushClickBehaviorAndroid } from './types'; /** * Configure package using CustomerioConfig @@ -19,8 +19,8 @@ class CustomerioConfig { autoTrackPushEvents: boolean = true; backgroundQueueMinNumberOfTasks: number = 10; backgroundQueueSecondsDelay: number = 30; - androidPushClickBehavior: AndroidPushClickBehavior = - AndroidPushClickBehavior.ActivityPreventRestart; + pushClickBehaviorAndroid: PushClickBehaviorAndroid = + PushClickBehaviorAndroid.ActivityPreventRestart; } class CustomerIOEnv { diff --git a/src/types/AndroidPushClickBehavior.tsx b/src/types/PushClickBehaviorAndroid.tsx similarity index 77% rename from src/types/AndroidPushClickBehavior.tsx rename to src/types/PushClickBehaviorAndroid.tsx index 791ad451..24dd7615 100644 --- a/src/types/AndroidPushClickBehavior.tsx +++ b/src/types/PushClickBehaviorAndroid.tsx @@ -1,4 +1,4 @@ -export enum AndroidPushClickBehavior { +export enum PushClickBehaviorAndroid { ResetTaskStack = 'RESET_TASK_STACK', ActivityPreventRestart = 'ACTIVITY_PREVENT_RESTART', ActivityNoFlags = 'ACTIVITY_NO_FLAGS', diff --git a/src/types/index.tsx b/src/types/index.tsx index a8c14ee0..bbe796e5 100644 --- a/src/types/index.tsx +++ b/src/types/index.tsx @@ -1,3 +1,3 @@ -export * from './AndroidPushClickBehavior'; +export * from './PushClickBehaviorAndroid'; export * from './PushPermissionOptions'; export * from './PushPermissionStatus';