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

Convert Android Telemetry To V2 Data Model #4071

Closed

Description

@bleege

The first iteration of Android Telemetry ( #2421) was built using the original Events data model (aka V1). V2 has now been internally approved and will what is used going forward. Android needs to be converted to use this data model so that it only uses V2 from Telemetry's initial release in 4.0.0..

/cc @mapbox/telemetry

Activity

  1. added
    Android
    telemetry
    on Feb 22, 2016
  2. self-assigned this
    on Feb 22, 2016
  3. added this to the android-v4.0.0 milestone on Feb 22, 2016
  4. added a commit that references this issue on Feb 22, 2016
  5. added 3 commits that reference this issue on Feb 22, 2016
  6. bleege commented on Feb 23, 2016

    @bleege
    ContributorAuthor

    While implementing isPluggedIn() for the pluggedIn attribute I found that the ideal API in Android is BatteryManager.ACTION_CHARGING. However it's API 23+ which means we'll likely have to rely on a combination of BATTERY_PLUGGED_AC, BATTERY_PLUGGED_USB, and BATTERY_STATUS_CHARGING.

  7. added a commit that references this issue on Feb 23, 2016
  8. bleege commented on Feb 23, 2016

    @bleege
    ContributorAuthor

    I decided to go with reusing the ACTION_BATTERY_CHANGED Intent that's already being used for determining battery level to determine if the device is currently connected or not as described in Google's documentation instead of implementing the more sophisticated ACTION_POWER_CONNECTED and ACTION_POWER_DISCONNECTED as it required using a standalone BroadcastReceiver. This may change in the future however.

    I also limited the isPluggedIn() determination to BATTERY_PLUGGED_USB and BATTERY_PLUGGED_AC even though according to the documentation it'd likely be safe to assume anything greater than 0 for this value would indicate being plugged in. The value being "knowing for sure" over "not knowing for sure, but pretty likely". BATTERY_PLUGGED_WIRELESS was not used as it is API 17+ while the SDK currently supports 15+. Again, these things may change in the future.

  9. added 3 commits that reference this issue on Feb 23, 2016
  10. 12 remaining items

  11. bleege commented on Feb 24, 2016

    @bleege
    ContributorAuthor

    Confirmed appTurnstile and location events with latest code accepted and displayed in database.

  12. bleege commented on Feb 24, 2016

    @bleege
    ContributorAuthor

    Confirmed map.load event with same code as previous comment.

  13. bleege commented on Feb 24, 2016

    @bleege
    ContributorAuthor

    Confirmed map.click and map.dragend with new code that broke them apart. Registered all 8 types of Gestures for map.click.

    Will do one final test for all events with code base before officially signing off on this.

  14. bleege commented on Feb 24, 2016

    @bleege
    ContributorAuthor

    Confirmed that all the events minus map.load made it into the server. I think this is a race condition as map.load and appTurnstile are tied together and appTurnstile flushes immediately. This is likely causing the event queue may be being cleared out after appTurnstile is sent but just after the time map.load is being added.

  15. bleege commented on Feb 24, 2016

    @bleege
    ContributorAuthor

    I confirmed with @camilleanne in chat that order is irrelevant for map.load and appTurnstile so I refactored the processing to do map.load first so that when appTurnstile flushes the queue it'll already be there and will get sent.

    I think Android is ready to go with V2 now! 🎉

  16. boundsj commented on Feb 24, 2016

    @boundsj
    Contributor

    @bleege @camilleanne thanks for confirming. iOS had already been changed to send the turnstile on map load. In a more recent commit, I've added an api client that make it easy to send the turnstile event immediately whenever a mapview event is about to be enqueued (but still only once per "session")

  17. zugaldia commented on Feb 24, 2016

    @zugaldia
    Member

    I think Android is ready to go with V2 now! 🎉

    💥 💥 💥

  18. added a commit that references this issue on Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidtelemetry

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions