-
Notifications
You must be signed in to change notification settings - Fork 1
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
feature / screen size π± #20
base: develop
Are you sure you want to change the base?
Conversation
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.
Thanks for this! Is there a backend ticket so that the value will actually be picked up and processed?
Also, when I was still working on this project, the backend would reject requests that contained unknown keys. Something to keep in mind.
} | ||
portraitDpScreenSize | ||
} catch (e: Throwable) { | ||
Q42StatsLogger.e(TAG, "Could not read screen size. Returning null", e) |
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.
error or warning? Warning seems most appropriate.
@@ -111,6 +111,8 @@ versions of Android. If unsupported, the corresponding key is omitted. | |||
| Key | Value | Notes | | |||
|-|-|-| | |||
| `screenOrientation`| portrait, landscape, unknown | | |||
| `screenWidth` | String | Screen width in density-independent pixels. Beware: this value is different when there is a different screen orientation. | |
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 think all data types are strings, right? But I might remember incorrectly. As documentation, it would be more informative to list how the backend should parse the string. Reading this table does not answer the question of whether it is an int or float
Gets screen size in density-independent pixels and portrait mode π±
Tested on:
β Android 13: S22+ / Fold 4
β Android 12: S10e
β Android 11: emulator
β Android 10: device
β Android 9: device
β Android 8: device
β Android 7: emulator
β Android 6: emulator
β Android 5: emulator