You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Initial implementation of Turnstile and Map Load are built. Testing is needed to verify. Also, I punted on the the "Push Enabled" key on the Map Load event as this is iOS in nature. Need to confirm that on Android we'll use this to mean Cloud Messaging.
Google's example code for how to implement Google Cloud Messaging in Android apps. Will investigate to see what hooks / tech is being used that Telemetry can detect for.
Discovered in Google's sample app, that the client requires Google Play Services library to run. Based on this we can do a runtime classpath search for a member class of this library (such as GcmListenerService) and if it's found then mark "Push Enabled" as true otherwise default it to false.
Just looking now at the newly minted V2 of the Events API, Push Enabled is no longer in it so there's no need to worry about this attribute. Next action will be to confirm that Map Load and Turnstile are being sent as expected and then merge.
The plan will be to double back after initial implementation of these events and the remaining Interaction Events in #3889 and convert them and the server URL to V2.
I refactored the control logic for sending in the Turnstile Event and confirmed that it sends it in at Map Load time. I also confirmed that Map Load only is sent when the MapView is initially created and won't resend on device rotation which recreates the MapView instance as that's just how the Android lifecycle rolls.
The Turnstile Event and Map Load events use the same "send data to Mapbox" HTTP infrastructure as the Location events do. However during testing the server responds with an HTTP 500 error code when Turnstile and Map Load are sent in, but HTTP 204 all good code when Location is sent in (see below). This tells me that there's still some validation logic that's getting tripped up on the server. I'm not too worried about this as this is V1 of the API and the staging server is in a bit of transient state these days. I'm going to merge this code in now and will confirm that everything is 100% A-OK when the migration to V2 happens.
02-18 10:50:34.044 22101-22486/com.mapbox.mapboxsdk.testapp D/MapboxEventManager: url = https://cloudfront-staging.tilestream.net/events/v1?access_token=sk.eyJ1IjoiYmxlZWdlIiwiYSI6InNpcml1c2x5In0.KyT-boMyC_xZYTYojTc8zg
02-18 10:50:40.864 22101-22486/com.mapbox.mapboxsdk.testapp D/MapboxEventManager: Response Code from Mapbox Events Server: 500 for 3 events sent in.
02-18 10:51:14.662 22101-22101/com.mapbox.mapboxsdk.testapp I/LocationServices: onLocationChanged()...Location[network 43.054829,-89.443154 acc=18 et=+4d13h40m52s958ms {Bundle[mParcelledData.dataSize=696]}]
02-18 10:51:14.665 22101-22101/com.mapbox.mapboxsdk.testapp D/TelemLocationReceiver: location received = Location[network 43.054829,-89.443154 acc=18 et=+4d13h40m52s958ms {Bundle[mParcelledData.dataSize=696]}]
02-18 10:52:15.851 22101-23867/com.mapbox.mapboxsdk.testapp D/MapboxEventManager: original = 8a07f5a6-cde5-4aea-a083-c81c2938fe3f; hex = 2E7BD9E094FF09ADCCFA8312897DB49E0DAA5182
02-18 10:52:18.642 22101-23867/com.mapbox.mapboxsdk.testapp D/MapboxEventManager: url = https://cloudfront-staging.tilestream.net/events/v1?access_token=sk.eyJ1IjoiYmxlZWdlIiwiYSI6InNpcml1c2x5In0.KyT-boMyC_xZYTYojTc8zg
02-18 10:52:23.871 22101-23867/com.mapbox.mapboxsdk.testapp D/MapboxEventManager: Response Code from Mapbox Events Server: 204 for 1 events sent in.
Activity
bleege commentedon Feb 16, 2016
Documenting current setup in iOS:
MGLEventTypeAppUserTurnstilepushTurnstileEvent:[android] #3897 - Initial Turnstile event with when to push logic inf…
[android] #3897 - Initial Map Load event
bleege commentedon Feb 17, 2016
Initial implementation of Turnstile and Map Load are built. Testing is needed to verify. Also, I punted on the the "Push Enabled" key on the Map Load event as this is iOS in nature. Need to confirm that on Android we'll use this to mean Cloud Messaging.
[android] #3897 - Changing initial flush delay time to 10 seconds
bleege commentedon Feb 17, 2016
Google's example code for how to implement Google Cloud Messaging in Android apps. Will investigate to see what hooks / tech is being used that Telemetry can detect for.
boundsj commentedon Feb 17, 2016
@bleege I'm not sure if this is useful info for you but I recently merged #3713
The idea is that we now only send turnstile when the map loads instead of when telemetry is inited
boundsj commentedon Feb 17, 2016
Oh! Nvm, I see you listed it above now.
bleege commentedon Feb 17, 2016
@boundsj Actually, thanks for the link to the ticket #3713! I discovered the commit in
masterthe other day but couldn't find the larger ticket.bleege commentedon Feb 17, 2016
Discovered in Google's sample app, that the client requires Google Play Services library to run. Based on this we can do a runtime classpath search for a member class of this library (such as
GcmListenerService) and if it's found then mark "Push Enabled" astrueotherwise default it tofalse.bleege commentedon Feb 18, 2016
Just looking now at the newly minted V2 of the Events API,
Push Enabledis no longer in it so there's no need to worry about this attribute. Next action will be to confirm thatMap LoadandTurnstileare being sent as expected and then merge.The plan will be to double back after initial implementation of these events and the remaining Interaction Events in #3889 and convert them and the server URL to V2.
/cc @camilleanne @mick
[android] #3897 - Updating TestApp versionCode and versionName to mak…
[android] #3897 - Refactoring check that determines when to send turn…
bleege commentedon Feb 18, 2016
I refactored the control logic for sending in the Turnstile Event and confirmed that it sends it in at Map Load time. I also confirmed that Map Load only is sent when the MapView is initially created and won't resend on device rotation which recreates the MapView instance as that's just how the Android lifecycle rolls.
The Turnstile Event and Map Load events use the same "send data to Mapbox" HTTP infrastructure as the Location events do. However during testing the server responds with an HTTP 500 error code when Turnstile and Map Load are sent in, but HTTP 204 all good code when Location is sent in (see below). This tells me that there's still some validation logic that's getting tripped up on the server. I'm not too worried about this as this is V1 of the API and the staging server is in a bit of transient state these days. I'm going to merge this code in now and will confirm that everything is 100% A-OK when the migration to V2 happens.
[android] #3897 - Initial Turnstile event with when to push logic inf…
[android] #3897 - Initial Map Load event
[android] #3897 - Changing initial flush delay time to 10 seconds
[android] #3897 - Updating TestApp versionCode and versionName to mak…
[android] #3897 - Refactoring check that determines when to send turn…
bleege commentedon Feb 18, 2016
Rebased and Merged.