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
I have a question: how do you distinguish between mobile and desktop browser?
I saw a code snippet like:
val userAgent =Window.Navigator.getUserAgent() ?:""if(userAgent.contains("Mobile") || userAgent.contains("Android")) {
// mobile browser
}
but this does not seem to work because of missing GWTBridge class at runtime. Also, it is GWT stuff and I am not sure if this is the correct approach for TeaVM.
In LibGDX itself I only see an ApplicationType which always return WebGL for TeaVM backend. I think you cannot distinguish between mobile and desktop browser with that.
How would you solve that?
The text was updated successfully, but these errors were encountered:
Hi,
I have a question: how do you distinguish between mobile and desktop browser?
I saw a code snippet like:
but this does not seem to work because of missing GWTBridge class at runtime. Also, it is GWT stuff and I am not sure if this is the correct approach for TeaVM.
In LibGDX itself I only see an ApplicationType which always return WebGL for TeaVM backend. I think you cannot distinguish between mobile and desktop browser with that.
How would you solve that?
The text was updated successfully, but these errors were encountered: