mauron85/cordova-plugin-background-geolocation

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 ().

41916397-92fc5036-791d-11e8-9b6d-f92dfe21fdde
41916401-93cbd716-791d-11e8-8614-ec26be180499

According to the documentation, you are only able to remove the notification when in foreground by setting startForeground to false.