This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[android] Integration of the new events library #10999
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
402802f
[android] integration of the new events library
Guardiola31337 002d6a2
JNI Bug
electrostat bf354fe
Clean-up
electrostat 03a077c
fix #10999 comments
Guardiola31337 3ced76f
[android] fix sdk identifier and sdk version
Guardiola31337 867ed80
[android] merge from master (MAS 3.0)
Guardiola31337 bcf3d42
[android] bump events lib version to 3.0.0-beta.1 and remove never us…
Guardiola31337 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 0 additions & 107 deletions
107
...rm/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/EmptyLocationSource.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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; | ||
} | ||
|
||
|
@@ -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? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove or ticket. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ticketed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This should be ticketed in this repo 👉 https://github.com/mapbox/mapbox-gl-native/issues |
||
public static LocationEngine getLocationEngine() { | ||
return INSTANCE.locationEngine; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 0 additions & 199 deletions
199
...ndroid/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationSource.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
.../android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/package-info.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
MAPBOX_VERSION_STRING
still being used or was it replaced byMAPBOX_SDK_VERSION
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still being used in
HTTPRequest
👀mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java
Line 210 in e2a4dff