largeIcon property

String? largeIcon
getter/setter pair

Configure the large icon of the persistent notification in the Notification Bar when running with Config.foregroundService true

When running the service with Config.foregroundService: true, Android requires a persistent notification in the Notification Bar. This allows you customize that icon. Defaults to your application icon.

⚠️ Warning:

  • You must specify the type (drawable|mipmap) of resource you wish to use in the following format: {type}/icon_name
  • Do not append the file-extension (eg: .png)

Example

// 1. drawable
BackgroundGeolocation.ready(Config(
  notification: Notification(
    largeIcon: "drawable/my_custom_notification_large_icon"
  )
});

// 2. mipmap
BackgroundGeolocation.ready(Config(
  notification: Notification(
    largeIcon: "mipmap/my_custom_notification_large_icon"
  )
});

ℹ️ See also:

Implementation

String? largeIcon;