Know if the device is mobile

Hi, How do I know if the device is mobile?

I tryed with

WebBrowser b = (WebBrowser)this.getContext().getBrowser();

but i know only the OS … Thank’s

Maybe you can try using Spring Mobile.


The very same object can also tell you if the device is a touch device and its screen size. What else would you like to know?


you can figure this out by looking at the “HTTP_USER_AGENT” header in your app.