Important Notice - Forums is archived
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.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
CssImport when using Component Exporter by Mikhail Shabarov, 7 months ago
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
Last updated on
Hi,
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?
cheers,
matti
Last updated on
you can figure this out by looking at the "HTTP_USER_AGENT" header in your app.
Last updated on
You cannot reply to this thread.