snowplow / snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
http://snowplowanalytics.com
Apache License 2.0
107 stars 63 forks source link

Handle errors when fetching screen resolution in Subject (close #657) #664

Closed mscwilson closed 5 months ago

mscwilson commented 5 months ago

I was unable to replicate the bug reported in #657. However, the stack trace is pretty clear about the problem, which is WindowManager being used with an Application (not Activity) context. The defaultDisplay() and getSize() methods are deprecated also.

This PR replaces WindowManager with a more suitable way of fetching the screen resolution in Subject.