cordova - 如何从插件“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
}
});
解决方案
BackgroundGeolocation.configure({
...
debug: false,
startForeground: false,
...
});
推荐阅读
- angular - ngOnInit 未订阅可观察事件
- db2 - 在 IBM i (as400) SQL 中创建/删除行权限
- excel - 为什么不能将集合插入数组
- javascript - 如何添加“使用严格;” 在 VS Code 中打开新的 JavaScript 文件时在第一行?
- sql - 文本格式的日期 - Birt
- android - Android mvvm livedata 没有观察到
- javascript - 如何在组件中获取当前路由名称?
- netezza - SQL 将列值拆分为 Netezza 中的行
- linux - 埃菲尔:有没有办法将彩色字符打印到终端(控制台)
- javascript - JsonResult 只接受第一个参数,忽略其余参数