Skip to content

Commit

Permalink
use mP logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Poornima Nagarajan committed Nov 27, 2024
1 parent b219f1b commit d5fd6b5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/kotlin/com/mparticle/kits/ApptentiveKitUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ package com.mparticle.kits
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Context.RECEIVER_EXPORTED
import android.content.Context.RECEIVER_NOT_EXPORTED
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import android.util.Log
import apptentive.com.android.feedback.Apptentive
import apptentive.com.android.feedback.ApptentiveActivityInfo
import com.mparticle.MParticle

import com.mparticle.internal.Logger

object ApptentiveKitUtils {
@JvmStatic
Expand All @@ -25,17 +23,17 @@ object ApptentiveKitUtils {
}
if (MParticle.getInstance()?.isKitActive(MParticle.ServiceProviders.APPTENTIVE) == true) {
Apptentive.registerApptentiveActivityInfoCallback(callback)
Log.d("ApptentiveKitUtils", "registerApptentiveActivityContext: kit is active")
Logger.debug("ApptentiveKitUtils", "registerApptentiveActivityContext: kit is active")
} else {
val filter = IntentFilter(MParticle.ServiceProviders.BROADCAST_ACTIVE + MParticle.ServiceProviders.APPTENTIVE)
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU) {
callback.getApptentiveActivityInfo()
?.registerReceiver(broadcastReceiver, filter, RECEIVER_EXPORTED)
Log.d("ApptentiveKitUtils", "registerApptentiveActivityContext: kit is active SDK 33+")
Logger.debug("ApptentiveKitUtils", "registerApptentiveActivityContext: SDK 33+")
} else {
callback.getApptentiveActivityInfo()
?.registerReceiver(broadcastReceiver, filter)
Log.d("ApptentiveKitUtils", "registerApptentiveActivityContext: kit is active SDK < 33")
Logger.debug("ApptentiveKitUtils", "registerApptentiveActivityContext: SDK < 33")
}
}
}
Expand Down

0 comments on commit d5fd6b5

Please sign in to comment.