首页 > 解决方案 > 如何从插件“cordova-plugin-mauron85-background-geolocation”中删除通知

问题描述

在我的应用程序中,我不想向用户显示通知或此类消息。我要你不要出现。我该怎么做?

这是我的配置:

BackgroundGeolocation.configure({
locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,
desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
stationaryRadius: 50,
distanceFilter: 50,
notificationTitle: 'Background tracking',
notificationText: 'enabled',
debug: true,
interval: 10000,
fastestInterval: 5000,
activitiesInterval: 10000,
url: 'http://192.168.81.15:3000/location',
httpHeaders: {
  'X-FOO': 'bar'
},
// customize post properties
postTemplate: {
  lat: '@latitude',
  lon: '@longitude',
  foo: 'bar' // you can also add your own properties
}
});

指数 指数2

标签: cordovaionic-frameworkcordova-plugins

解决方案


BackgroundGeolocation.configure({
...
debug: false,
startForeground: false,
...
});

推荐阅读