gwtweb-applicationsgwt-bootstrap

determine if the device on which browser is running in gwt bootstrap


Is their any way in gwt or gwt bootstrap to find the device on which the web app is running. Like if the device is iphone,tablet,desktop.ipad etc.,Please help.


Solution

  • You don't need bootstrap at all to know which browser your client is running on.

    Just call...

    Navigator.getUserAgent() 
    

    ...to get the user-agent of the browser.

    A list of all user-ager avaiable is provided here:

    http://www.useragentstring.com/pages/All/

    For instance, check for "ipad" match in user-agent String.