All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nz.co.senanque.vaadin.RequestWrapper Maven / Gradle / Ivy

Go to download

Integrates Madura Objects with Vaadin applications including support for dynamic metadata changes (available choices, read/write status of fields etc).

There is a newer version: 3.4.1
Show newest version
package nz.co.senanque.vaadin;

import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinService;

/**
 * @author Roger Parkinson
 *
 */
public class RequestWrapper {
	
	public static boolean isMobile() {
		VaadinRequest vaadinRequest = VaadinService.getCurrentRequest();

        boolean mobileUserAgent = vaadinRequest.getHeader("user-agent")
                .toLowerCase().contains("mobile");
        return mobileUserAgent;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy