Adds the new properties in platform context entity (mobile_context schema) version 1-0-3:
Property
Description
isPortrait
A Boolean indicating whether the device orientation is portrait (either upright or upside down)
resolution
Screen resolution in pixels. Arrives in the form of WIDTHxHEIGHT (e.g., 1200x900). Doesn't change when device orientation changes
scale
Scale factor used to convert logical coordinates to device coordinates of the screen (uses UIScreen.scale on iOS and DisplayMetrics.density on Android)
language
System language currently used on the device (ISO 639)
Scope of the appSetId. Can be scoped to the app or to a developer account on an app store (all apps from the same developer on the same device will have the same ID)
Also makes it configurable which properties should be tracked in the entity in case the user does not want to track all of them.
Related issues
569
565
450
Limitations
The app set ID has to be retrieved on a background thread so it is asynchronous from the tracker initialization. This means that in between the time that the tracker is initialized (createTracker is called) and the identifier is retrieved, there may be several events tracked without it being retrieved yet.
Unfortunately, I couldn't find a way around this. But to make the impact smaller, I set the ID to be stored in Android general preferences (persistent storage) once it is retrieved the first time. So on the second and following starts of the app, it can be read synchronously from the general prefs and can be added to all events.
Issue #598
Adds the new properties in platform context entity (
mobile_context
schema) version 1-0-3:appSetId
. Can be scoped to the app or to a developer account on an app store (all apps from the same developer on the same device will have the same ID)Also makes it configurable which properties should be tracked in the entity in case the user does not want to track all of them.
Related issues
569
565
450
Limitations
The app set ID has to be retrieved on a background thread so it is asynchronous from the tracker initialization. This means that in between the time that the tracker is initialized (
createTracker
is called) and the identifier is retrieved, there may be several events tracked without it being retrieved yet.Unfortunately, I couldn't find a way around this. But to make the impact smaller, I set the ID to be stored in Android general preferences (persistent storage) once it is retrieved the first time. So on the second and following starts of the app, it can be read synchronously from the general prefs and can be added to all events.