ForegroundService notification not working

Please provide the following:

  1. SDK Version: 48
  2. Platforms: Android

I have an app that is supposed to record the location even when the app is running in the background. However, after a certain time, the location is always sent at longer intervals.
To prevent this, the foreground service should be activated. However, this does not show any notification.

if (this.backgroundStatus == 'granted') {
            await Location.startLocationUpdatesAsync(taskName, {
                accuracy: Location.Accuracy.BestForNavigation,              
                timeInterval: backgroundTaskTimeIntervall.executeTask, 
                activityType: Location.ActivityType.AutomotiveNavigation, //AutomotiveNavigation,
                showsBackgroundLocationIndicator: true,
                foregroundService: {
                    notificationTitle: "App is running",
                    notificationBody: "Location tracking",
                },
            });
        }

For this purpose, I have entered FOREGROUND_SERVICE in the authorisations

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