{"action":"created","issue":{"url":"https://api.github.com/repos/mauron85/react-native-background-geolocation/issues/205","repository_url":"https://api.github.com/repos/mauron85/react-native-background-geolocation","labels_url":"https://api.github.com/repos/mauron85/react-native-background-geolocation/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/mauron85/react-native-background-geolocation/issues/205/comments","events_url":"https://api.github.com/repos/mauron85/react-native-background-geolocation/issues/205/events","html_url":"https://github.com/mauron85/react-native-background-geolocation/issues/205","id":327707902,"node_id":"MDU6SXNzdWUzMjc3MDc5MDI=","number":205,"title":"BootCompletedReceiver does not work (Android)","user":{"login":"priezz","id":6680317,"node_id":"MDQ6VXNlcjY2ODAzMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/6680317?v=4","gravatar_id":"","url":"https://api.github.com/users/priezz","html_url":"https://github.com/priezz","followers_url":"https://api.github.com/users/priezz/followers","following_url":"https://api.github.com/users/priezz/following{/other_user}","gists_url":"https://api.github.com/users/priezz/gists{/gist_id}","starred_url":"https://api.github.com/users/priezz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/priezz/subscriptions","organizations_url":"https://api.github.com/users/priezz/orgs","repos_url":"https://api.github.com/users/priezz/repos","events_url":"https://api.github.com/users/priezz/events{/privacy}","received_events_url":"https://api.github.com/users/priezz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-30T12:26:59Z","updated_at":"2018-09-17T11:41:10Z","closed_at":null,"author_association":"NONE","body":"Module does not work on app termination and phone boot (Android)\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n<!--- Please specify exact version numbers and don't use terms like \"latest\", as such reference to numeric version changes over the time -->\r\n* Plugin version: 0.5.0-alpha.33\r\n* Platform: Android\r\n* OS version: 8.0\r\n* Device manufacturer and model: Sony XA1\r\n* React Native version: 0.55.2\r\n* Plugin configuration options:\r\n```\r\n{\r\n    activitiesInterval: 1000,\r\n    activityType: 'Fitness',\r\n    desiredAccuracy: BackgroundGeolocation.LOW_ACCURACY,\r\n    distanceFilter: 10,\r\n    debug: false,\r\n    fastestInterval: 30000,\r\n    interval: 60000,\r\n    locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,\r\n    maxLocations: 1000000,\r\n    startForeground: true,\r\n    startOnBoot: true,\r\n    stationaryRadius: 10,\r\n    stopOnTerminate: false,\r\n    stopOnStillActivity: false,\r\n}\r\n``` \r\n* Link to your project:\r\n\r\n## Context\r\n<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->\r\n\r\n## Expected Behavior\r\nNo errors\r\n\r\n## Actual Behavior\r\n...\r\n\r\n## Possible Fix\r\nTried to add the following into `AndroidManifest.xml`, but does not help:\r\n```\r\n    <service android:name=\"com.marianhello.bgloc.LocationService\"/>\r\n    <receiver android:name=\"com.marianhello.bgloc.BootCompletedReceiver\" android:enabled=\"true\" android:exported=\"true\">\r\n      <intent-filter>\r\n        <action android:name=\"android.intent.action.BOOT_COMPLETED\"/>\r\n        <action android:name=\"android.intent.action.QUICKBOOT_POWERON\"/>\r\n        <action android:name=\"com.htc.intent.action.QUICKBOOT_POWERON\"/>\r\n        <category android:name=\"android.intent.category.DEFAULT\" />\r\n      </intent-filter>\r\n    </receiver>\r\n```\r\n\r\n## Debug logs\r\nLogs from Crashalitics:\r\n```\r\nFatal Exception: java.lang.RuntimeException\r\nUnable to start receiver com.marianhello.bgloc.BootCompletedReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { flg=0x4 cmp=com.dvaplus.best/com.marianhello.bgloc.LocationService (has extras) }: app is in background uid UidRecord{f611f74 u0a450 RCVR idle procs:1 seq(0,0,0)}\r\n```\r\n```\r\nCaused by java.lang.IllegalStateException\r\nNot allowed to start service Intent { flg=0x4 cmp=com.dvaplus.best/com.marianhello.bgloc.LocationService (has extras) }: app is in background uid UidRecord{f611f74 u0a450 RCVR idle procs:1 seq(0,0,0)}\r\n```\r\n```\r\ncom.marianhello.bgloc.BootCompletedReceiver.onReceive (BootCompletedReceiver.java:51)\r\n```"},"comment":{"url":"https://api.github.com/repos/mauron85/react-native-background-geolocation/issues/comments/421980086","html_url":"https://github.com/mauron85/react-native-background-geolocation/issues/205#issuecomment-421980086","issue_url":"https://api.github.com/repos/mauron85/react-native-background-geolocation/issues/205","id":421980086,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTk4MDA4Ng==","user":{"login":"RikNieuwoudt","id":13750674,"node_id":"MDQ6VXNlcjEzNzUwNjc0","avatar_url":"https://avatars2.githubusercontent.com/u/13750674?v=4","gravatar_id":"","url":"https://api.github.com/users/RikNieuwoudt","html_url":"https://github.com/RikNieuwoudt","followers_url":"https://api.github.com/users/RikNieuwoudt/followers","following_url":"https://api.github.com/users/RikNieuwoudt/following{/other_user}","gists_url":"https://api.github.com/users/RikNieuwoudt/gists{/gist_id}","starred_url":"https://api.github.com/users/RikNieuwoudt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RikNieuwoudt/subscriptions","organizations_url":"https://api.github.com/users/RikNieuwoudt/orgs","repos_url":"https://api.github.com/users/RikNieuwoudt/repos","events_url":"https://api.github.com/users/RikNieuwoudt/events{/privacy}","received_events_url":"https://api.github.com/users/RikNieuwoudt/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T11:41:10Z","updated_at":"2018-09-17T11:41:10Z","author_association":"NONE","body":"I'm also getting this error, guys. Any update on the cause?"}}
{"actor":{"display_login":"RikNieuwoudt"}}