Commit 3c058687 authored by shutupwesley's avatar shutupwesley

Update docs and example to show notification customization.

parent c4a65d5b
......@@ -77,7 +77,9 @@ A full example could be:
desiredAccuracy: 10,
stationaryRadius: 20,
distanceFilter: 30,
debug: true // <-- enable this hear sounds for background-geolocation life-cycle.
debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
notificationTitle: 'Background tracking', // <-- android only, customize the title of the notification
notificationText: 'ENABLED' // <-- android only, customize the text of the notification
});
// Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app.
......@@ -162,6 +164,9 @@ Compare now background-geolocation in the scope of a city. In this image, the l
![distanceFilter at city scale](/distance-filter-city.png "distanceFilter at city scale")
#####`@param {String} notificationText/Title`
On Android devices it is required to have a notification in the drawer because it's a "foreground service". This gives it high priority, decreasing probability of OS killing it. To customize the title and text of the notification, set these options.
## Licence ##
......
......@@ -98,7 +98,9 @@ var app = {
desiredAccuracy: 10,
stationaryRadius: 20,
distanceFilter: 30,
debug: true // <-- enable this hear sounds for background-geolocation life-cycle.
debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
notificationTitle: 'Background tracking', // <-- android only, customize the title of the notification
notificationText: 'ENABLED' // <-- android only, customize the text of the notification
});
// Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app.
......
......@@ -8,7 +8,7 @@ module.exports = {
locationTimeout = (config.locationTimeout >= 0) ? config.locationTimeout : 60, // seconds
desiredAccuracy = (config.desiredAccuracy >= 0) ? config.desiredAccuracy : 100, // meters
debug = config.debug || false,
notificationTitle = config.notificationTitle || "Background checking",
notificationTitle = config.notificationTitle || "Background tracking",
notificationText = config.notificationText || "ENABLED";
exec(success || function() {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment