This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we added proguard rules accordingly as described in the documentation | |
# Moengage | |
-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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// we added several line in this code | |
class MyFirebaseMessagingService : MoEFireBaseMessagingService() { | |
override fun onMessageReceived(remoteMessage: RemoteMessage?) { | |
super.onMessageReceived(remoteMessage) | |
if (remoteMessage == null) return | |
val pushPayload = remoteMessage.data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We also created custom push listener | |
class CustomPushMessageListener : PushMessageListener() { | |
override fun onHandleRedirection(activity: Activity?, payload: Bundle?) { | |
super.onHandleRedirection(activity, payload) | |
payload?.keySet()?.forEach { | |
Log.i("MOENGAGE", "$it = ${payload.getString(it)}") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// we created this class to listen to token received | |
class TokenReceivedListener(private val context: Context): PushManager.OnTokenReceivedListener { | |
private val TAG = TokenReceivedListener::class.java.simpleName | |
override fun onTokenReceived(token: String?) { | |
token?.let { | |
// future implementation | |
} |
OlderNewer