{"action":"created","issue":{"url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/36","repository_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation","labels_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/36/comments","events_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/36/events","html_url":"https://github.com/transistorsoft/react-native-background-geolocation/issues/36","id":119072431,"node_id":"MDU6SXNzdWUxMTkwNzI0MzE=","number":36,"title":"Getting location to work when app is killed","user":{"login":"cosmith","id":1194749,"node_id":"MDQ6VXNlcjExOTQ3NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1194749?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmith","html_url":"https://github.com/cosmith","followers_url":"https://api.github.com/users/cosmith/followers","following_url":"https://api.github.com/users/cosmith/following{/other_user}","gists_url":"https://api.github.com/users/cosmith/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmith/subscriptions","organizations_url":"https://api.github.com/users/cosmith/orgs","repos_url":"https://api.github.com/users/cosmith/repos","events_url":"https://api.github.com/users/cosmith/events{/privacy}","received_events_url":"https://api.github.com/users/cosmith/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2015-11-26T16:13:01Z","updated_at":"2018-09-11T11:45:45Z","closed_at":"2015-11-26T16:32:35Z","author_association":"NONE","body":"Hi,\n\nEverything seems to be working fine on Android but I can't figure out how to make my app keep track of the position after it has been killed (double press home + swipe). Is it possible or am I mistaken? I couldn't get it to work either on device nor in the emulator with \"Freeway drive\".\n\nThis is my initialization code:\n\n``` js\nvar startBgGeoloc = function () {\n    Storage.getUserProperty(\"token\").then(token => {\n        var options = {\n            debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.\n\n            // common\n            desiredAccuracy: 10,\n            distanceFilter: 100,\n            stopOnTerminate: false,\n            activityRecognitionInterval: 10000,\n            stopTimeout: 2, // 2 minutes\n\n            // iOS\n            stationaryRadius: 100, // restart tracking after the user has moved 100m\n            activityType: \"AutomotiveNavigation\",\n            useSignificantChangesOnly: false,\n\n            // Android\n            startOnBoot: true,\n            locationUpdateInterval: 5 * 60 * 1000,\n            fastestLocationUpdateInterval: 60 * 1000,\n            forceReloadOnLocationChange: false,  // <-- [Android] If the user closes the app **while location-tracking is started** , reboot app when a new location is recorded (WARNING: possibly distruptive to user)\n            forceReloadOnMotionChange: false,    // <-- [Android] If the user closes the app **while location-tracking is started** , reboot app when device changes stationary-state (stationary->moving or vice-versa) --WARNING: possibly distruptive to user)\n            forceReloadOnGeofence: false,        // <-- [Android] If the user closes the app **while location-tracking is started** , reboot app when a geofence crossing occurs --WARNING: possibly distruptive to user)\n\n            // HTTP / SQLite config\n            url: Server.SERVER_URL + \"/tracking-locations/\",\n            batchSync: false,       // <-- [Default: false] Set true to sync locations to server in a single HTTP request.\n            autoSync: true,         // <-- [Default: true] Set true to sync each location to server as it arrives.\n            maxDaysToPersist: 1,    // <-- Maximum days to persist a location in plugin\"s SQLite database when HTTP fails\n            headers: {\n                \"Authorization\": `Token ${token}`\n            },\n            params: {\n            }\n        };\n\n        BackgroundGeolocation.configure(options);\n        BackgroundGeolocation.setOptions(options);\n\n        BackgroundGeolocation.start(() => {\n            Log.debug(\"[BackgroundGeolocation] started successfully\");\n\n            // Fetch current position\n            BackgroundGeolocation.getCurrentPosition({timeout: 30}, (location) => {\n                Log.debug(\"[BackgroundGeolocation] received current position: \", JSON.stringify(location));\n            }, (error) => {\n                alert(\"Location error: \" + error);\n            });\n        });\n    });\n};\n```\n"},"comment":{"url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/comments/420244911","html_url":"https://github.com/transistorsoft/react-native-background-geolocation/issues/36#issuecomment-420244911","issue_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/36","id":420244911,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDI0NDkxMQ==","user":{"login":"christocracy","id":14999,"node_id":"MDQ6VXNlcjE0OTk5","avatar_url":"https://avatars1.githubusercontent.com/u/14999?v=4","gravatar_id":"","url":"https://api.github.com/users/christocracy","html_url":"https://github.com/christocracy","followers_url":"https://api.github.com/users/christocracy/followers","following_url":"https://api.github.com/users/christocracy/following{/other_user}","gists_url":"https://api.github.com/users/christocracy/gists{/gist_id}","starred_url":"https://api.github.com/users/christocracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christocracy/subscriptions","organizations_url":"https://api.github.com/users/christocracy/orgs","repos_url":"https://api.github.com/users/christocracy/repos","events_url":"https://api.github.com/users/christocracy/events{/privacy}","received_events_url":"https://api.github.com/users/christocracy/received_events","type":"User","site_admin":false},"created_at":"2018-09-11T11:45:45Z","updated_at":"2018-09-11T11:45:45Z","author_association":"MEMBER","body":"Do you realize you’re posting to a **closed** issue which was posted nearly 3 years ago.  Post a new issue.\r\n\r\n(The plugin already *runs a service* “at the OS level”)"}}
{"actor":{"display_login":"christocracy"}}