Friday, January 20, 2017

Re: mobile device detect and back button detect

To detect browsers/devices, the below works:

private static boolean IS_ANDROID;
private static boolean IS_IOS;
private static boolean IS_HANDHELD;
private static boolean IS_FIREFOX;
private static String VIDEO_EXTENSION = "_me.mp4";
private static String DEFAULT_IMAGE_DIRECTORY = "";

static {
= Window.Navigator.getUserAgent().toLowerCase().contains("android");
= Window.Navigator.getUserAgent().toLowerCase().contains("iphone") || Window.Navigator.getUserAgent().toLowerCase().contains("ipod");
= Window.Navigator.getUserAgent().toLowerCase().contains("firefox");

On Friday, January 20, 2017 at 7:32:39 AM UTC-8, David wrote:
In GWT, how do I detect mobile devices to get whether or not it is a Apple phone or Android phone. I also need to detect back button once uses click it. Now I used MGWT (version 2) to detect it. It doesn't work well.



You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment