Configuring Pro-guard

If you use Proguard to obfuscate your app use the following configuration in your app

info

Note

If you are using SDK version 9.5.00 or later you can skip this section. Pro-guard is pre-configured by the SDK.

Groovy
-dontwarn com.google.android.gms.location.**
-keep class com.google.android.gms.location.** { *; }

-keep class com.moe.pushlibrary.activities.** { *; }
-keep class com.moe.pushlibrary.MoEHelper
-keep class com.moengage.locationlibrary.GeofenceIntentService
-keep class com.moe.pushlibrary.InstallReceiver
-keep class com.moe.pushlibrary.providers.MoEProvider
-keep class com.moe.pushlibrary.models.** { *;}
-keep class com.moengage.core.GeoTask
-keep class com.moengage.location.GeoManager
-keep class com.moengage.inapp.InAppManager
-keep class com.moengage.push.PushManager
-keep class com.moengage.inapp.InAppController
-keep class com.moe.pushlibrary.AppUpdateReceiver
-keep class com.moengage.core.MoEAlarmReceiver
-keep class com.moengage.core.MoEngage
 
# Push 
-keep class com.moengage.pushbase.activities.PushTracker
-keep class com.moengage.pushbase.activities.SnoozeTracker
-keep class com.moengage.pushbase.push.MoEPushWorker
-keep class com.moe.pushlibrary.MoEWorker
  
# Real Time Triggers
-keep class com.moengage.addon.trigger.DTHandlerImpl
-keep class com.moengage.core.MoEDTManager
-keep class com.moengage.core.MoEDTManager.DTHandler

# Push Amplification
-keep class com.moengage.addon.messaging.MessagingHandlerImpl
-keep class com.moengage.push.MoEMessagingManager
-keep class com.moengage.addon.messaging.MoEMessageSyncJob
-keep class com.moengage.addon.messaging.MoEMessageSyncReceiver
-keep class com.moengage.addon.messaging.MoEMessageSyncIntentService

-dontwarn com.moengage.location.GeoManager
-dontwarn com.moengage.core.GeoTask
-dontwarn com.moengage.receiver.*
-dontwarn com.moengage.worker.*
-dontwarn com.moengage.inapp.ViewEngine

-keep class com.delight.**  { *; }

Add the below when using MoEngage FCM receiver

Groovy
# only when using FCM
-keep class com.moengage.firebase.MoEngaeFireBaseMessagingService
-keep class com.moengage.firebase.MoEngageFireBaseInstanceIdService
-keep class com.moengage.firebase.PushHandlerImpl

Previous

Next

Was this article helpful?
1 out of 1 found this helpful

How can we improve this article?