To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
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.