Package com.eclipsesource.tabris.ClientDevice

Examples of com.eclipsesource.tabris.ClientDevice.Platform


@SuppressWarnings("restriction")
public class TabrisClientProvider implements ClientProvider {

  @Override
  public boolean accept( HttpServletRequest request ) {
    Platform platform = DeviceUtil.getPlatform();
    boolean result = platform == ANDROID || platform == IOS;
    if( result ) {
      setThemeForPlatform( platform );
    }
    return result;
View Full Code Here


public class DeviceUtil {

  public static Platform getPlatform() {
    String userAgent = RWT.getRequest().getHeader( Constants.USER_AGENT );
    Platform result = Platform.WEB;
    if( userAgent != null && userAgent.contains( Constants.ID_IOS ) ) {
      result = Platform.IOS;
    } else if( userAgent != null && userAgent.contains( Constants.ID_ANDROID ) ) {
      result = Platform.ANDROID;
    }
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.ClientDevice.Platform

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.