You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On our app we are using mParticle and we've recently found out, when enabling StrictMode we are seeing these errors every time we are logging an event:
Tried to access visual service WindowManager from a non-visual Context:glovoapp.App@9be9157 WindowManager should be accessed from Activity or other visual Context. Use an Activity or a Context created with Context#createWindowContext(int, Bundle), which are adjusted to the configuration and visual bounds of an area on screen.
java.lang.IllegalAccessException: Tried to access visual service WindowManager from a non-visual Context:glovoapp.App@9be9157
at android.app.ContextImpl.getSystemService(ContextImpl.java:2208)
at android.content.ContextWrapper.getSystemService(ContextWrapper.java:935)
at com.mparticle.internal.MPUtility.getOrientation(SourceFile:1)
at com.mparticle.internal.j.n(SourceFile:21)
at com.mparticle.internal.i.a(SourceFile:364)
at com.mparticle.b.handleMessage(SourceFile:17)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:68)
After exploring a little bit what could this be, found out this MPUtility.getOrientation(context: Context) (link) is using an ApplicationContext coming from MessageManager (link), which is initialized above using the options.getContext().getApplicationContext() (link).
Not sure if this will help, just thought of sharing and seeing if it could be avoided. Not sure what the orientation is used for, but maybe could be an optional check, as it would be great to not have these IllegalAccessException every time something is tracked 😄 .
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered:
Hello!
On our app we are using mParticle and we've recently found out, when enabling StrictMode we are seeing these errors every time we are logging an event:
After exploring a little bit what could this be, found out this
MPUtility.getOrientation(context: Context)
(link) is using anApplicationContext
coming fromMessageManager
(link), which is initialized above using theoptions.getContext().getApplicationContext()
(link).Not sure if this will help, just thought of sharing and seeing if it could be avoided. Not sure what the orientation is used for, but maybe could be an optional check, as it would be great to not have these
IllegalAccessException
every time something is tracked 😄 .Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: