You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iceraven-browser/app/src/main/java/org/mozilla/fenix/push/LeanplumNotificationCustomi...

32 lines
1.1 KiB
Kotlin

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.push
import android.app.Notification
import android.os.Bundle
import androidx.core.app.NotificationCompat
import com.leanplum.LeanplumPushNotificationCustomizer
import org.mozilla.fenix.R
/**
* Notification customizer for incoming Leanplum push messages.
*/
class LeanplumNotificationCustomizer : LeanplumPushNotificationCustomizer {
override fun customize(
builder: NotificationCompat.Builder,
notificationPayload: Bundle?
) {
builder.setSmallIcon(R.drawable.ic_status_logo)
}
// Do not implement if unless we want to support 2 lines of text in the BigPicture style.
// See: https://docs.leanplum.com/docs/customize-your-push-notifications-sample-android
override fun customize(
builder: Notification.Builder?,
notificationPayload: Bundle?,
notificationStyle: Notification.Style?
) = Unit // no-op
}