Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Bildirim Alanın Özelleştirilmesi

Bu modül mobil bildirim kampanyalarınız içindir. Yukarda belirtildiği gibi etkinleştirilmesi gerekmektedir.

RelatedDigital.setIsPushNotificationsEnabled() metodu 5 zorunlu, 8 opsiyonel parametrede almaktadır.

Zorunlu parametreler:

  • context: Context

  • isPushNotificationEnabled: Boolean

  • googleAppAlias: String

  • huaweiAppAlias: String

  • token: String

Opsiyonel Parametreler

  • notificationSmallIcon: Int

  • notificationSmallIconDarkMode: Int

  • isNotificationLargeIcon: Boolean

  • notificationLargeIcon: Int

  • notificationLargeIconDarkMode

  • notificationPushIntent: String

  • notificationChannelName: String

  • notificationColor: String

Opsiyonel Parametreler

Açıklama

notificationSmallIcon

Status Bar’da ve bildirim alanının sol üstünde görüntülenecek ikonu girmek içindir. Projenizdeki herhangi bir resource un id sini vermeniz gerekmektedir.

Eğer değer girilmezse uygulamanızın simgesi kullanılır.

notificationSmallIconDarkMode

Cihaz koyu temadayken görünecek notificationSmallIcon değerini girmek içindir.

Eğer değer girilmezse uygulamanızın simgesi kullanılır.

isNotificationLargeIcon

Bildirim alanının sağında bir ikon bulunup bulunmamasına karar vermek içindir.

true → bulunur

false → bulunmaz

Eğer değer girilmezse büyük ikon kullanılmaz.(false)

notificationLargeIcon

Bildirim alanının sağında görünecek büyük ikonu girmek içindir. Projenizdeki herhangi bir resource un id sini vermeniz gerekmektedir.

Eğer değer girilmezse ve isNotificationLargeIcon true ise uygulamanızın simgesi kullanılır.

notificationLargeIconDarkMode

Cihaz koyu temadayken görünecek notificationLargeIcon değerini girmek içindir.

Eğer değer girilmezse ve isNotificationLargeIcon true ise uygulamanızın simgesi kullanılır.

notificationPushIntent

Bildirime tıklandığında açılacak Activity'e karar vermek içindir. Burda Activity'nin tam yolunun girilmesi gerekmektedir.

Eğer değer girilmezse uygulamanızın başlatıcı aktivitesine (launcher activity) yönlenecektir.

notificationChannelName

Bildirim kanalına verilecek ismi girmek içindir.

Eğer değer girilmezse uygulamanızın ismi kullanılır.

notificationColor

Bildirim alanında kullanılacak accent color değerini girmek içindir.

Tüm parametreleri içeren örnek bir kullanım aşağıdaki gibidir.

RelatedDigital.setIsPushNotificationEnabled(
  context = applicationContext,
  isPushNotificationEnabled = true,
  googleAppAlias = Constants.GOOGLE_APP_ALIAS,
  huaweiAppAlias = Constants.HUAWEI_APP_ALIAS,
  token = token,
  notificationSmallIcon = R.drawable.text_icon,
  notificationSmallIconDarkMode = R.drawable.text_icon_dark_mode,
  isNotificationLargeIcon = true,
  notificationLargeIcon = R.mipmap.ic_launcher,
  notificationLargeIconDarkMode = R.mipmap.ic_launcher,
  notificationPushIntent = "com.relateddigital.androidexampleapp.PushNotificationActivity",
  notificationChannelName = "relateddigital-android-test",
  notificationColor = "#d1dbbd"
  )

  • No labels