Skip to content

Commit

Permalink
Don't send properties the platform doesn't support
Browse files Browse the repository at this point in the history
  • Loading branch information
ninovanhooff committed Oct 20, 2021
1 parent 900cec2 commit 0f2ff00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,28 @@ Q42Stats.logLevel = Q42StatsLogLevel.Debug

## Data collected

Not all fields are supported on all versions of Android. If unsupported, the corresponding value may be false, "unknown" or the key may be completely omitted.
Not all fields are supported on all versions of Android. If unsupported, the corresponding key is omitted.

### Accessibliity

| Key | Value | Notes |
|-|-|-|
| `isAccessibilityManagerEnabled` | bool | true when any accessibility service (eg. Talkback) is Enabled |
| `isClosedCaptioningEnabled` | bool | Live transcription of any spoken audio |
| `isClosedCaptioningEnabled` | bool | Live transcription of any spoken audio (min sdk 19) |
| `isTouchExplorationEnabled` | bool | Wehether any assistive feature is enabled where the user navigates the interface by touch. Most probably TalkbBack, or similar
| `isTalkBackEnabled` | bool | iOS: VoiceOver
| `isSamsungTalkBackEnabled` | bool | Specifically checks whether com.samsung.android.app.talkback.talkbackservice is enabled
| `isVoiceAccessEnabled` | bool | iOS: Voice Control
| `fontScale` | float | 1.0 is regular scaling |
| `displayScale` | float | Overall interface scaling ie. display density scaling. 1.0 is regular scaling |
| `displayScale` | float | Overall interface scaling ie. display density scaling. 1.0 is regular scaling (minSdk 24)|
| `enabledAccessibilityServices` | Array\<String\> | List of enabled accessibility package names, eg ['com.accessibility.service1', 'nl.accessibility.service2'] |

### Preferences

| Key | Value | Notes |
|-|-|-|
| `daytime`| day, twilight, night, unknown | Coarse estimation of time of day. unknown if user is not in Amsterdam TimeZone
| `isNightModeEnabled` | bool | iOS: Dark Mode
| `isNightModeEnabled` | bool | iOS: Dark Mode (minSdk: 29)

### Screen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@ internal object AccessibilityCollector {
context.resources.displayMetrics.densityDpi / DisplayMetrics.DENSITY_DEVICE_STABLE.toDouble()
)
}

put(
"isClosedCaptioningEnabled",
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
put(
"isClosedCaptioningEnabled",
(context.getSystemService(CAPTIONING_SERVICE) as CaptioningManager).isEnabled
} else {
false
}
)
)
}

put("enabledAccessibilityServices", services.toString())

Expand Down

0 comments on commit 0f2ff00

Please sign in to comment.