diff options
author | Brad Leege <bleege@gmail.com> | 2016-02-01 11:54:55 -0600 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2016-02-10 19:05:20 -0800 |
commit | 8464d68687b172df7508fc18af7b3558d097ca71 (patch) | |
tree | 7b4df2453e9b083b32b440ad5675860ac952d888 /platform | |
parent | 9d5ef69a2eb631e65dfa3ed8a66425a6c6580912 (diff) | |
download | qtlocation-mapboxgl-8464d68687b172df7508fc18af7b3558d097ca71.tar.gz |
[android] #2421 - Start MapView in Passive Telemetry Mode
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index 5a47c5b3a5..488f1dd49a 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -53,7 +53,6 @@ import android.widget.ArrayAdapter; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ZoomButtonsController; - import com.almeros.android.multitouch.gesturedetectors.RotateGestureDetector; import com.almeros.android.multitouch.gesturedetectors.ShoveGestureDetector; import com.almeros.android.multitouch.gesturedetectors.TwoFingerGestureDetector; @@ -79,9 +78,9 @@ import com.mapbox.mapboxsdk.exceptions.TelemetryServiceNotConfiguredException; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.geometry.LatLngBounds; import com.mapbox.mapboxsdk.layers.CustomLayer; +import com.mapbox.mapboxsdk.location.LocationServices; import com.mapbox.mapboxsdk.telemetry.TelemetryService; import com.mapbox.mapboxsdk.utils.ApiAccess; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.nio.ByteBuffer; @@ -369,8 +368,12 @@ public class MapView extends FrameLayout { // Force a check for Telemetry validateTelemetryServiceConfigured(); + // Start Telemetry Service Intent telemetryService = new Intent(getContext(), TelemetryService.class); getContext().startService(telemetryService); + + // Start PASSIVE Telemetry + LocationServices.getLocationServices(getContext()).toggleGPS(false); } // Force a check for an access token |