[android] Integration of the new events library#10999
Conversation
6532a4e to
a30a81b
Compare
|
@Guardiola31337 @electrostat Parallel to this PR, @osana is working on integrating the MAS 3.x on #10920 and I believe she's encountering some (old) telemetry integration issues. Would you recommend working on MAS 3.x integration as branched work from this PR, or should we continue with the current approach on #10920? |
|
@zugaldia @electrostat @Guardiola31337 @cammace @tobrun Turned out that the issue I had was related to my JNI code but the error message said that it was not finding some class related to GoogleLocationEngine. I should be good for now. If needed I will cherry-pick my change into the a child branch of this one. |
So far, we needed to create So, whatever is easier for you ¯\_(ツ)_/¯ |
| private Boolean connected; | ||
| private LocationEngine locationEngine; | ||
| @SuppressLint("StaticFieldLeak") | ||
| private static MapboxTelemetry telemetry; |
There was a problem hiding this comment.
any background on why this should be static?
| // TODO transform.getZoom() may cause a NullPointerException | ||
| MapState twoFingerTap = new MapState((float) latLng.getLatitude(), (float) latLng.getLongitude(), (float) | ||
| transform.getZoom()); | ||
| twoFingerTap.setGesture("TwoFingerTap"); |
There was a problem hiding this comment.
do we have any gesture constants? eg. for TwoFingerTap etc.
| MapboxEvent.GESTURE_TWO_FINGER_SINGLETAP, transform)); | ||
| MapEventFactory mapEventFactory = new MapEventFactory(); | ||
| LatLng latLng = projection.fromScreenLocation(new PointF(event.getX(), event.getY())); | ||
| // TODO transform.getZoom() may cause a NullPointerException |
There was a problem hiding this comment.
on top of this todo, would it be possible hardening add same checks as with #10959 ?
| MapEventFactory mapEventFactory = new MapEventFactory(); | ||
| LatLng latLng = projection.fromScreenLocation(new PointF(event.getX(), event.getY())); | ||
| // TODO transform.getZoom() may cause a NullPointerException | ||
| MapState twoFingerTap = new MapState((float) latLng.getLatitude(), (float) latLng.getLongitude(), (float) |
There was a problem hiding this comment.
Would it makes sense changing MapState to double instead of float?
| } | ||
|
|
||
| ConnectivityReceiver.instance(appContext); | ||
| Timber.d("instance: connectivity receiver started"); |
There was a problem hiding this comment.
How adding a log solves a JNI bug?
In any case, we should remove these logs before merging because they'd clutter Logcat unnecessarily.
|
@tobrun cc @electrostat |
88bc8f4 to
0d5aac4
Compare
electrostat
left a comment
There was a problem hiding this comment.
Looks Good.
@tobrun give it a once over, if you can. Then I think we are good to go on this one.
zugaldia
left a comment
There was a problem hiding this comment.
Some comments to the PR, non-blocking, can be addressed in follow up tickets if necessary.
| @@ -0,0 +1,79 @@ | |||
| package com.mapbox.mapboxsdk.utils; | |||
|
|
|||
| // TODO Remove this class if we finally include it within MAS 3.x (GeoJSON) | |||
There was a problem hiding this comment.
Ticketed
This should be ticketed in this repo 👉 https://github.com/mapbox/mapbox-gl-native/issues
| * | ||
| * @return the location engine configured | ||
| */ | ||
| // TODO Do we need to expose this? |
There was a problem hiding this comment.
Ticketed
This should be ticketed in this repo 👉 https://github.com/mapbox/mapbox-gl-native/issues
| implementation dependenciesList.supportDesign | ||
|
|
||
| implementation dependenciesList.lost | ||
| // implementation dependenciesList.lost |
|
|
||
| versions = [ | ||
| mapboxServices: '2.2.9', | ||
| mapboxTelemetryVersion: '3.0.0-SNAPSHOT', |
There was a problem hiding this comment.
Is it necessary to rely on a SNAPSHOT? If so, upgrading to a stable version needs to be ticketed.
| supportRecyclerView : "com.android.support:recyclerview-v7:${versions.supportLib}", | ||
|
|
||
| lost : "com.mapzen.android:lost:${versions.lost}", | ||
| gmsLocation : 'com.google.android.gms:play-services-location:11.0.4', |
There was a problem hiding this comment.
We should use ${versions.*} for consistency here too.
| 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) |
There was a problem hiding this comment.
Is MAPBOX_VERSION_STRING still being used or was it replaced by MAPBOX_SDK_VERSION?
5b6fde7 to
35e618c
Compare
35e618c to
867ed80
Compare
|
can we update this PR with telem beta version and merge this? |
…ed methods from math utils class
bcf3d42 addresses ☝️ I guess that we’re moving forward and we’ll remove |
Follow up ticket 👉 #11182 |
* [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
* [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
cc @electrostat @tobrun @osana @zugaldia @boundsj