Migration From Old Dengage Sdk

Migration From Old Dengage Sdk

Class Imports

You can change class imports with respect to table below.

Old SdkNew Sdk
com.dengage.sdk.DengageLifecycleTrackercom.dengage.sdk.util.DengageLifecycleTracker
com.dengage.sdk.NotificationReceivercom.dengage.sdk.push.NotificationReceiver
com.dengage.sdk.FcmMessagingServicecom.dengage.sdk.push.FcmMessagingService
com.dengage.sdk.HmsMessagingServicecom.dengage.sdk.push.HmsMessagingService
com.dengage.sdk.Constantscom.dengage.sdk.util.Constants
com.dengage.sdk.models.Messagecom.dengage.sdk.domain.push.model.Message
com.dengage.sdk.models.CarouselItemcom.dengage.sdk.domain.push.model.CarouselItem
com.dengage.sdk.models.InboxMessagecom.dengage.sdk.domain.inboxmessage.model.InboxMessage
com.dengage.sdk.models.Subscriptioncom.dengage.sdk.domain.subscription.model.Subscription
com.dengage.sdk.models.DengageErrorcom.dengage.sdk.callback.DengageError
com.dengage.sdk.models.TagItemcom.dengage.sdk.domain.tag.model.TagItem

Renamed DengageManager Class

Sdk's main class named DengageManager is renamed as Dengage. Also you don't need to get
instance of DengageManager class and keep it as parameter anymore. You can just call functions
of sdk like Dengage.functionName.

Removal of DengageEvent Class

DengageEvent class removed. DengageEvent functions moved to Dengage class.

Example:

// In old sdk
DengageEvent.getInstance(context).pageView(data)

// In new sdk
Dengage.pageView(data)

Initiation of Dengage

Changed initiation of the sdk. You should just call init function with parameters.

Example:

// In old sdk
DengageManager
.getInstance(applicationContext)
.setFirebaseIntegrationKey(FIREBASE_APP_INTEGRATION_KEY)
.init()

// In new sdk
Dengage.init(
context = applicationContext,
firebaseIntegrationKey = FIREBASE_APP_INTEGRATION_KEY,
huaweiIntegrationKey = HUAWEI_APP_INTEGRATION_KEY, /* Optional */
firebaseApp: FirebaseApp? /* Optional */
)

// the new sdk also has support of DengageManager wrapper class so you current implementation won't be effected if you are migrating.

Removed Methods and Alternatives

We removed, renamed or moved some methods in new sdk. You should make changes for migration with
respect to table below.

Old SdkNew SdkExplanation
DengageManager.initWithFirebaseInstanceDengage.initNew init method contains an optional parameter named firebaseApp
DengageManager.isGooglePlayServicesAvailableConfigurationUtils.isGooglePlayServicesAvailableMethod moved from manager class to utils of configuration
DengageManager.isHuaweiMobileServicesAvailableConfigurationUtils.isHuaweiMobileServicesAvailableMethod moved from manager class to utils of configuration
DengageManager.setPermissionDengage.setUserPermissionMethod is removed, you should use new one
DengageManager.subscribeDengage.setTokenMethod is removed, you should use new one
DengageManager.buildSubscription-You don't need to call this function anymore
DengageManager.saveSubscription-You don't need to call this function anymore
DengageManager.syncSubscription-You don't need to call this function anymore

NotificationReceiver Updated

  • Simplified carousel rendering. We have only one function named onCarouselRender for setting
    push messages with carousel content. Removed old method named onCarouselReRender. Changed
    image downloading methods of sdk. Removed some calculations for carousel content. Our sample
    receiver PushNotificationReceiver

  • You can override rich or text notification methods on your notification receiver class for using
    custom notifications (Optional)
    Example:

override fun onRichNotificationRender(
context: Context,
intent: Intent,
message: Message,
bitmap: Bitmap,
notificationBuilder: NotificationCompat.Builder
) {
// do not call super
// do your custom implementation
}

override fun onTextNotificationRender(
context: Context,
intent: Intent,
message: Message,
notificationBuilder: NotificationCompat.Builder
) {
// do not call super
// do your custom implementation
}
    • Related Articles

    • (Old Android/Huawei Version) - Android SDK

      Sdk Implementation Add dengage sdk dependency to your project level gradle file. Java dependencies { implementation 'com.github.dengage-tech:dengage-android-sdk:6.0.85' } For latest Android SDK click Sdk Necessary Rules Application Manifest ...
    • (Old iOS Version) - Implementing the SDK

      Implementing Mobile SDK for IOS requires the steps below Setting Integration Key Integration Key is generated by CDMP Platform while defining application. It is a hash string that contains information about the application. At the beginning of your ...
    • Firebase SDK Setup

      Requirements Google Firebase App Configuration Android Studio Android Device or Emulator DĀ·engage Mobil SDK for Android supports version 4.4 (API Level 19) and later. DĀ·engage Mobil SDK for Huawei supports all new versions. 1. Create Firebase App 1.1 ...
    • Dengage Onboarding

      Welcome to Dengage CXDP! This guide will walk you through the onboarding process, which consists of two main topics: Data Integration and Channel Integration. Data Integration Dengage CXDP enables you to store and manage both online and offline data. ...
    • (Old iOS Version) - New in iOS SDK

      Adjust Adid sync with dengage You can sync adjust adid with dengage through the following method Dengage.setPartnerDeviceId(adid: String?) Set Development Status Dengage.setDevelopmentStatus(isDebug: Bool)