-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add com.snowplowanalytics.snowplow/mobile_context/jsonschema/1-0-3 (close #1252) #1253
Closed
Closed
Changes from all commits
Commits
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
136 changes: 136 additions & 0 deletions
136
schemas/com.snowplowanalytics.snowplow/mobile_context/jsonschema/1-0-3
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 |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{ | ||
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", | ||
"description": "Schema for mobile contexts", | ||
"self": { | ||
"vendor": "com.snowplowanalytics.snowplow", | ||
"name": "mobile_context", | ||
"format": "jsonschema", | ||
"version": "1-0-3" | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"osType": { | ||
"type": "string", | ||
"description": "Operating system type (e.g., ios, tvos, watchos, osx, android)" | ||
}, | ||
"osVersion": { | ||
"type": "string", | ||
"description": "The current version of the operating system" | ||
}, | ||
"deviceManufacturer": { | ||
"type": "string", | ||
"description": "The manufacturer of the product/hardware" | ||
}, | ||
"deviceModel": { | ||
"type": "string", | ||
"description": "The end-user-visible name for the end product" | ||
}, | ||
"carrier": { | ||
"type": ["string", "null"], | ||
"description": "The carrier of the SIM inserted in the device" | ||
}, | ||
"networkType": { | ||
"type": ["string", "null"], | ||
"enum": ["mobile", "wifi", "offline", null], | ||
"description": "Type of network the device is connected to" | ||
}, | ||
"networkTechnology": { | ||
"type": ["string", "null"], | ||
"description": "Radio access technology that the device is using" | ||
}, | ||
"openIdfa": { | ||
"type": ["string", "null"], | ||
"description": "Deprecated tracking identifier for iOS" | ||
}, | ||
"appleIdfa": { | ||
"type": ["string", "null"], | ||
"description": "Advertising identifier on iOS" | ||
}, | ||
"appleIdfv": { | ||
"type": ["string", "null"], | ||
"description": "UUID identifier for vendors on iOS" | ||
}, | ||
"androidIdfa": { | ||
"type": ["string", "null"], | ||
"description": "Advertising identifier on Android" | ||
}, | ||
"physicalMemory": { | ||
"type": ["integer", "null"], | ||
"minimum": 0, | ||
"maximum": 9223372036854775807, | ||
"description": "Total physical system memory in bytes" | ||
}, | ||
"systemAvailableMemory": { | ||
"type": ["integer", "null"], | ||
"minimum": 0, | ||
"maximum": 9223372036854775807, | ||
"description": "Available memory on the system in bytes (Android only)" | ||
}, | ||
"appAvailableMemory": { | ||
"type": ["integer", "null"], | ||
"minimum": 0, | ||
"maximum": 9223372036854775807, | ||
"description": "Amount of memory in bytes available to the current app (iOS only)" | ||
}, | ||
"batteryLevel": { | ||
"type": ["integer", "null"], | ||
"minimum": 0, | ||
"maximum": 100, | ||
"description": "Remaining battery level as an integer percentage of total battery capacity" | ||
}, | ||
"batteryState": { | ||
"type": ["string", "null"], | ||
"enum": ["unplugged", "charging", "full", null], | ||
"maxLength": 255, | ||
"description": "Battery state for the device" | ||
}, | ||
"lowPowerMode": { | ||
"type": ["boolean", "null"], | ||
"description": "A Boolean indicating whether Low Power Mode is enabled (iOS only)" | ||
}, | ||
"availableStorage": { | ||
"type": ["integer", "null"], | ||
"minimum": 0, | ||
"maximum": 9223372036854775807, | ||
"description": "Bytes of storage remaining" | ||
}, | ||
"totalStorage": { | ||
"type": ["integer", "null"], | ||
"minimum": 0, | ||
"maximum": 9223372036854775807, | ||
"description": "Total size of storage in bytes" | ||
}, | ||
"isPortrait": { | ||
"type": ["boolean", "null"], | ||
"description": "A Boolean indicating whether the device orientation is portrait (either upright or upside down)" | ||
}, | ||
"resolution": { | ||
"type": ["string", "null"], | ||
"maxLength": 20, | ||
"description": "Screen resolution in pixels. Arrives in the form of WIDTHxHEIGHT (e.g., 1200x900). Doesn't change when device orientation changes" | ||
}, | ||
"scale": { | ||
"type": ["number", "null"], | ||
"minimum": 0, | ||
"maximum": 1000, | ||
"description": "Scale factor used to convert logical coordinates to device coordinates of the screen (uses UIScreen.scale on iOS and DisplayMetrics.density on Android)" | ||
}, | ||
"language": { | ||
"type": ["string", "null"], | ||
"maxLength": 8, | ||
"description": "System language currently used on the device (ISO 639)" | ||
}, | ||
"appSetId": { | ||
"type": ["string", "null"], | ||
"format": "uuid", | ||
"description": "Android vendor ID scoped to the set of apps published under the same Google Play developer account (see https://developer.android.com/training/articles/app-set-id)" | ||
}, | ||
"appSetIdScope": { | ||
"type": ["string", "null"], | ||
"enum": ["app", "developer", null], | ||
"description": "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)" | ||
} | ||
}, | ||
"required": ["osType", "osVersion", "deviceManufacturer", "deviceModel"], | ||
"additionalProperties": false | ||
} |
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.
Can you only get a boolean here, no way to understand the actual device orientation? (i.e. upsidedown)
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 is possible to understand the orientation in more detail but the problem is that iOS and Android report it in a different way and I wasn't able to find a mapping between the states.
Here is a table with the values, I was only able to confidently map the portrait positions but not sure whether the natural landscape on Android is left or right on iOS and there are also extra positions on each platform not on the other (such as face up or down).
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.
I am ok with the boolean since this is the current state ^^
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.
Oh Android.
I think a boolean is probably a good idea 😂