Skip to content

Commit 6657f5f

Browse files
committed
Fix CT initialization when creating a push notification in the background
1 parent f65c917 commit 6657f5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

AndroidSDKCore/src/main/java/com/leanplum/migration/wrapper/CTWrapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ internal class CTWrapper(
8989
}
9090
cleverTapInstance?.apply {
9191
setLibrary("Leanplum")
92-
if (!ActivityLifecycleCallback.registered) {
92+
if (!ActivityLifecycleCallback.registered && LeanplumActivityHelper.getCurrentActivity() != null) {
9393
ActivityLifecycleCallback.register(context.applicationContext as? Application)
9494
if (!LeanplumActivityHelper.isActivityPaused() && !CleverTapAPI.isAppForeground()) {
9595
// Trigger onActivityResumed because onResume of ActivityLifecycle has already been executed

sdk-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.6.2-beta1
1+
7.6.2-beta2

0 commit comments

Comments
 (0)