Is it possible to hide the geolocation notification that appeare when startForeground is used
Opened this issue · 2 comments
*Ionic:
Ionic CLI : 6.10.1
Ionic Framework : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.4
-
Plugin version: 3.1.0
-
Platform: Android
-
OS version: 28+
-
Cordova version : 9.0.0 (cordova-lib@9.0.1)
-
Cordova platform version : android 8.1.0
-
Plugin configuration options:
config: BackgroundGeolocationConfig = {
desiredAccuracy: 10,
stationaryRadius: 20,
distanceFilter: 150,
interval: 1000,
fastestInterval: 500,
activitiesInterval: 900,
notificationText: '',
notificationTitle: '',
startForeground: true,
notificationsEnabled: false
};
Context
i am getting location while app is running in background
Actual Behavior
Every think is working fine except the notification that appear after the app start and persist even the app is on foreground or background
@mauron85 are there a workaround to hide this notification from code ?
here is an exemple of the notification ().
I don't think you can due to android specifications, see here:
https://stackoverflow.com/questions/10962418/how-to-startforeground-without-showing-notification
According to the documentation, you are only able to remove the notification when in foreground by setting startForeground
to false.