Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Integration of the new events library (#10999)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
Guardiola31337 committed Feb 13, 2018
1 parent ff747a8 commit 1b5b8bf
Show file tree
Hide file tree
Showing 27 changed files with 209 additions and 469 deletions.
2 changes: 2 additions & 0 deletions platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ android {
minSdkVersion androidVersions.minSdkVersion
targetSdkVersion androidVersions.targetSdkVersion
buildConfigField "String", "GIT_REVISION_SHORT", String.format("\"%s\"", getGitRevision())
buildConfigField "String", "MAPBOX_SDK_IDENTIFIER", String.format("\"%s\"", "mapbox-maps-android")
buildConfigField "String", "MAPBOX_SDK_VERSION", String.format("\"%s\"", project.VERSION_NAME)
buildConfigField "String", "MAPBOX_VERSION_STRING", String.format("\"Mapbox/%s\"", project.VERSION_NAME)
buildConfigField "String", "MAPBOX_EVENTS_USER_AGENT", String.format("\"MapboxEventsAndroid/%s\"", project.VERSION_NAME)
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@
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.
Expand Down Expand Up @@ -56,15 +52,9 @@ public static synchronized Mapbox getInstance(@NonNull Context context, @NonNull
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;
}

Expand Down Expand Up @@ -145,23 +135,12 @@ public static synchronized Boolean isConnected() {
return (activeNetwork != null && activeNetwork.isConnected());
}

/**
* 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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.mapbox.mapboxsdk.R;
import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.services.android.telemetry.utils.MathUtils;
import com.mapbox.mapboxsdk.utils.MathUtils;

/**
* Resembles the position, angle, zoom and tilt of the user's viewpoint.
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1b5b8bf

Please sign in to comment.