Background location foreground service notification icon not working

  1. SDK Version: 35.0.1
  2. Platform: Android

I have notifications configured with a custom icon in app.json. This works as expected for regular push notifications. Part of my app.json:

"notification": {
  "icon": "./assets/android-notification-shuttle.png",
  "color": "#0F007C"
},

However, when i start Location.startLocationUpdatesAsync and provide a foregroundService object, the icon visible in the status bar and the notification drawer is a white circle. It behaves as if the foreground service notification doesn’t take into account the configured icon in app.json. Am i missing something? My code looks like:

await Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, {
  accuracy: Location.Accuracy.High,
  activityType: Location.ActivityType.AutomotiveNavigation,
  foregroundService: {
    notificationTitle: 'notificationTitle',
    notificationBody: 'notificationBody',
    notificationColor: '#0F007C',
  },
});

The following screenshots show the status bar and the notification drawer. The regular notification work as expected. The foreground service notification however doesn’t.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.