diff options
author | Pablo Guardiola <guardiola31337@gmail.com> | 2018-02-13 12:23:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 12:23:17 +0100 |
commit | b8240f725cbfdb4b5369b050c933acdd4e42b705 (patch) | |
tree | 09e475b8a66c020e6eedd13ea7e196e78626e242 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java | |
parent | ff747a8c53805a270451cd6052d02073e45546a7 (diff) | |
download | qtlocation-mapboxgl-b8240f725cbfdb4b5369b050c933acdd4e42b705.tar.gz |
[android] Integration of the new events library (#10999) (#11183)
* [android] integration of the new events library
* JNI Bug
- current build with JNI bug
* fix #10999 comments
* Clean-up
- clean-up timbers and test code
* [android] fix sdk identifier and sdk version
* [android] merge from master (MAS 3.0)
* [android] bump events lib version to 3.0.0-beta.1 and remove never used methods from math utils class
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java index b67b6e96f2..853ea1c11b 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java @@ -8,16 +8,12 @@ import android.support.annotation.NonNull; import android.support.annotation.UiThread; import android.text.TextUtils; +import com.mapbox.android.core.location.LocationEngine; +import com.mapbox.android.core.location.LocationEnginePriority; +import com.mapbox.android.core.location.LocationEngineProvider; import com.mapbox.mapboxsdk.constants.MapboxConstants; import com.mapbox.mapboxsdk.exceptions.MapboxConfigurationException; -import com.mapbox.mapboxsdk.location.LocationSource; import com.mapbox.mapboxsdk.net.ConnectivityReceiver; -import com.mapbox.services.android.telemetry.MapboxTelemetry; -import com.mapbox.services.android.telemetry.location.LocationEngine; -import com.mapbox.services.android.telemetry.location.LocationEnginePriority; -import com.mapbox.services.android.telemetry.location.LocationEngineProvider; - -import timber.log.Timber; /** * The entry point to initialize the Mapbox Android SDK. @@ -56,15 +52,9 @@ public final class Mapbox { INSTANCE = new Mapbox(appContext, accessToken, locationEngine); locationEngine.setPriority(LocationEnginePriority.NO_POWER); - try { - MapboxTelemetry.getInstance().initialize( - appContext, accessToken, BuildConfig.MAPBOX_EVENTS_USER_AGENT, locationEngine); - } catch (Exception exception) { - Timber.e(exception, "Unable to instantiate Mapbox telemetry"); - } - ConnectivityReceiver.instance(appContext); } + return INSTANCE; } @@ -146,22 +136,11 @@ public final class Mapbox { } /** - * Returns a location source instance with empty methods. - * - * @return an empty location source implementation - * @deprecated Replaced by {@link Mapbox#getLocationEngine()} - */ - @Deprecated - public static LocationSource getLocationSource() { - return new EmptyLocationSource(); - } - - - /** * Returns the location engine used by the SDK. * * @return the location engine configured */ + // TODO Do we need to expose this? public static LocationEngine getLocationEngine() { return INSTANCE.locationEngine; } |