{"action":"created","issue":{"url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/616","repository_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt","labels_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/616/labels{/name}","comments_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/616/comments","events_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/616/events","html_url":"https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/616","id":301918351,"number":616,"title":"locationAuthorizationRequest with Always and device WhileInUse not firing location changes","user":{"login":"leandroz","id":4624850,"avatar_url":"https://avatars2.githubusercontent.com/u/4624850?v=4","gravatar_id":"","url":"https://api.github.com/users/leandroz","html_url":"https://github.com/leandroz","followers_url":"https://api.github.com/users/leandroz/followers","following_url":"https://api.github.com/users/leandroz/following{/other_user}","gists_url":"https://api.github.com/users/leandroz/gists{/gist_id}","starred_url":"https://api.github.com/users/leandroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandroz/subscriptions","organizations_url":"https://api.github.com/users/leandroz/orgs","repos_url":"https://api.github.com/users/leandroz/repos","events_url":"https://api.github.com/users/leandroz/events{/privacy}","received_events_url":"https://api.github.com/users/leandroz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-02T21:58:25Z","updated_at":"2018-03-02T23:45:24Z","closed_at":null,"author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n## Your Environment\r\n* Plugin version: 2.10.1\r\n* Platform: iOS\r\n* OS version: 11.2\r\n* Device manufacturer / model: iPhone 6S Simulator\r\n* Cordova version (`cordova -v`): 7.1.0\r\n* Cordova platform version (`cordova platform ls`): 4.5.4\r\n* Plugin config\r\n\r\n````\r\n{\r\n          desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,\r\n          distanceFilter: 50,\r\n          disableElasticity: true,\r\n          locationAuthorizationRequest: 'Always',\r\n          locationAuthorizationAlert: {\r\n            titleWhenOff: 'Some title off',\r\n            titleWhenNotEnabled: 'Some title when not enabled',\r\n            instructions: 'Some instructions',\r\n            cancelButton: 'Cancel',\r\n            settingsButton: 'Settings',\r\n          },\r\n          activityType: 'AutomotiveNavigation',\r\n          stopOnTerminate: false,\r\n          foregroundService: true,\r\n          notificationTitle: 'Some title',\r\n          notificationText: 'Location service activated',\r\n          debug: true,\r\n        },\r\n````\r\n\r\n## Expected Behavior\r\nThe plugin should shown the popup asking for Always but the location tracking should continue.\r\n\r\n## Actual Behavior\r\nThe plugin is showing the popup but the location tracking stops. If I go a change to Always and then back again to While In Use, it starts working.\r\n\r\nA first location event is trigger upon start, then the config returned from the start method, and it finishes with a motionchange event over location listener. Then nothing.\r\n\r\n## Steps to Reproduce\r\n<!--- reproduce this issue; include code to reproduce, if relevant -->\r\n1.\r\n2.\r\n3.\r\n4.\r\n\r\n## Context\r\n<!--- What were you trying to do? -->\r\n\r\n## Debug logs\r\n````\r\n2018-03-02 18:54:44.650176-0300  {\"coords\":{\"speed\":32.23,\"longitude\":-122.30853058,\"floor\":0,\"latitude\":37.49551793,\"accuracy\":5,\"altitude_accuracy\":-1,\"altitude\":0,\"heading\":287.23},\"sample\":true,\"extras\":{},\"is_moving\":false,\"odometer\":0,\"uuid\":\"40D3EE2E-9FED-435D-8392-DA8C25201D17\",\"activity\":{\"type\":\"unknown\",\"confidence\":100},\"battery\":{\"level\":-1,\"is_charging\":false},\"timestamp\":\"2018-03-02T21:54:44.636Z\"}\r\n2018-03-02 18:54:44.650582-0300 [TSBackgroundFetch addListener]: TSLocationManager\r\n2018-03-02 18:54:44.650717-0300  [TSBackgroundFetch start]\r\n2018-03-02 18:54:44.724579-0300{\"autoSyncThreshold\":0,\"httpTimeout\":60000,\"distanceFilter\":50,\"pausesLocationUpdatesAutomatically\":true,\"desiredOdometerAccuracy\":100,\"startOnBoot\":false,\"maxRecordsToPersist\":-1,\"debug\":true,\"disableStopDetection\":false,\"maxBatchSize\":-1,\"odometer\":0,\"headers\":{},\"extras\":{},\"maxDaysToPersist\":1,\"trackingMode\":1,\"url\":\"\",\"disableElasticity\":true,\"stopTimeout\":5,\"locationTemplate\":\"\",\"locationAuthorizationRequest\":\"Always\",\"params\":{},\"schedule\":[],\"activityRecognitionInterval\":10000,\"preventSuspend\":false,\"locationsOrderDirection\":\"ASC\",\"stopOnStationary\":false,\"useSignificantChangesOnly\":false,\"locationTimeout\":60,\"activityType\":\"AutomotiveNavigation\",\"locationAuthorizationAlert\":{\"settingsButton\":\"Settings\",\"cancelButton\":\"Cancel\",\"titleWhenNotEnabled\":\"requires access to your location.\",\"instructions\":\"To enjoy all that has to offer, you must enable \\\"Always\\\" in location settings.\",\"titleWhenOff\":\"To enjoy all that has to offer, turn on your GPS in your phone location settings.\"},\"method\":\"POST\",\"stationaryRadius\":25,\"disableMotionActivityUpdates\":false,\"elasticityMultiplier\":1,\"httpRootProperty\":\"location\",\"geofenceTemplate\":\"\",\"geofenceProximityRadius\":1000,\"logMaxDays\":7,\"batchSync\":false,\"stopAfterElapsedMinutes\":-1,\"stopOnTerminate\":false,\"desiredAccuracy\":0,\"stopDetectionDelay\":0,\"isMoving\":false,\"autoSync\":true,\"heartbeatInterval\":60,\"logLevel\":0,\"geofenceInitialTriggerEntry\":true,\"enabled\":true,\"minimumActivityRecognitionConfidence\":70,\"isHeartbeatEnabled\":false,\"schedulerEnabled\":false}\r\n2018-03-02 18:54:44.798189-0300 {\"coords\":{\"speed\":32.23,\"longitude\":-122.30853058,\"floor\":0,\"latitude\":37.49551793,\"accuracy\":5,\"altitude_accuracy\":-1,\"altitude\":0,\"heading\":287.23},\"extras\":{},\"is_moving\":false,\"event\":\"motionchange\",\"odometer\":0,\"uuid\":\"040039F1-CB76-4948-9C6E-60DB29038B86\",\"activity\":{\"type\":\"unknown\",\"confidence\":100},\"battery\":{\"level\":-1,\"is_charging\":false},\"timestamp\":\"2018-03-02T21:54:44.633Z\"}\r\n2018-03-02 18:54:49.157205-0300 INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher hitsForDispatch] (GAIBatchingDispatcher.m:368): No pending hits.\r\n2018-03-02 18:56:14.138917-0300 TIC Read Status [27:0x0]: 1:57\r\n2018-03-02 18:56:14.139134-0300 TIC Read Status [27:0x0]: 1:57\r\n````"},"comment":{"url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/comments/370089920","html_url":"https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/616#issuecomment-370089920","issue_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/616","id":370089920,"user":{"login":"christocracy","id":14999,"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-03-02T23:45:24Z","updated_at":"2018-03-02T23:45:24Z","author_association":"OWNER","body":"An XCode log of all this would be helpful."}}
{"actor":{"display_login":"christocracy"}}