StartOnBoot is not working properly
See original GitHub issueIt seems when StartOnBoot
is switched on, it should have switched on AutoStart
setting in the mobile but that didn’t happen.
Your Environment
- Plugin version: 3.0.0-beta.41
- Platform: Android
- OS version: 7.1.2
- Device manufacturer and model: Redmi 4, Xiaomi
- Cordova version (
cordova -v
): 7.1.0 - Cordova platform version (
cordova platform ls
): - Plugin configuration options:
BackgroundGeolocation.configure({
//locationProvider: backgroundGeolocation.provider.ANDROID_DISTANCE_FILTER_PROVIDER, //Distance Provider
locationProvider: 1, //Activity Provider
debug: false, // <-- enable this hear sounds for background-geolocation life-cycle.
stopOnTerminate: false, // <-- enable this to clear background location settings when the app terminates
startOnBoot: true, //Android Only, starts location tracking on device boot
interval: this.callbackInterval, //2min //In ms, Minimum time interval before update //Only for Android
startForeground: true, //Keep background location tracking active in foreground
url: this.globals.webApiBaseUrl + "/" + this.globals.apiVersion+ "/Location/AddMauron85Locations?UserId="+ model.UserId,
syncUrl: this.globals.webApiBaseUrl + "/" + this.globals.apiVersion + "/Location/AddMauron85Locations?UserId="+ model.UserId,
syncThreshold: 10, //Http post occurs after failed post locations number is beyond syncThreshold
maxLocations: 100000, //Max locations to store in local db
desiredAccuracy: 10, //In Meters
stationaryRadius: 60, //30, //In Meters
distanceFilter: 40, // 20, //In Meters, minimum distance a user must move horizontally before update
notificationsEnabled: true,
activityType: 'AutomotiveNavigation', //IOS Only
notificationIconSmall: 'notification',
notificationIconLarge: 'icon',
notificationIconColor: '#f86900',
notificationTitle: 'SmartTask', // <-- android only, customize the title of the notification
notificationText: 'Click to open App',
//ANDROID_ACTIVITY_PROVIDER
fastestInterval: (this.callbackInterval/3), //fatest interval in ms.
activitiesInterval: this.callbackInterval, //2 min //Activity recognition interval in ms
stopOnStillActivity: false, //Incase of still activity donot record location
postTemplate: model
});
Context
Debug logs
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
stopOnTerminate, startOnBoot not working . #89 - GitHub
Yes, you do both. You only #configure in your main component. If want to do the same stuff in the callback to #configure...
Read more >Boinc start on boot not working correctly.
I recently updated to BOINC Mgr 7.4.36. Now it seems there is a problem with startup and shutdown of the two Projects I...
Read more >Trying to start a service on boot on Android - Stack Overflow
I've been trying to start a service when a device boots up on android, but I cannot get it to work. I've looked...
Read more >Start on boot not working : r/blokada - Reddit
I'm having this issue as well. Every time I restart my phone, I have to manually open blokada, which then starts up on...
Read more >startmenuexperiencehost does not start on boot up Windows ...
When my PC goes to sleep or I restart it and log back in, I do not see the icons on the task...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in alpha.46
Hey I have the latest version of the plugin… and the background geolocation stops when the device is rebooted. @mauron85 can you suggest anything I can try to solve this issue using this plugin?