Google Nexus 7 user agent & Utils.isDesktop

713 views
Skip to first unread message

jogo

unread,
Apr 4, 2013, 12:42:16 PM4/4/13
to gwtm...@googlegroups.com
I was wondering, why on my tablet is the font size small. In the Page.setPageResolution is called Utils.isDesktop method, which in this case returns true, because the user agent
value doesn't contain 'mobile'.

User agent: Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; Nexus 7 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30

Zhihua (Dennis) Jiang

unread,
Apr 4, 2013, 10:13:49 PM4/4/13
to gwtm...@googlegroups.com
Looks like the isDesktop method should look for the word "Android" in the user agent, right? 



--
You received this message because you are subscribed to the Google Groups "GWT Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwtmobile+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jogo

unread,
Apr 5, 2013, 4:15:21 AM4/5/13
to gwtm...@googlegroups.com
There are already methods isIOS and isAndroid, so this should do the trick:

public static boolean isDesktop() {
  return !isIOS() && !isAndroid();
Reply all
Reply to author
Forward
0 new messages