You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Description

  • org.joget.apps.app.service.MobileUtil
  • Under wflow-core module
  • Utility classes for mobile related features.

Code Sample

import org.joget.apps.app.service.MobileUtil;


if (MobileUtil.isMobileView()) {
    //return mobile html template
} else {
    //return normal html template
}

Fields

MOBILE_VIEW
public static final String MOBILE_VIEW = "_mobileView_";

A key used to set the HTTP request attribute when it is a mobile view.

Methods

isMobileDisabled
public static boolean isMobileDisabled()

Flag to indicate the mobile support is disabled by system

isMobileUserAgent
public static boolean isMobileUserAgent()

Checks whether the current thread is being called from a mobile browser

isMobileUserAgent
public static boolean isMobileUserAgent(javax.servlet.http.HttpServletRequest request)

Checks whether the current request is being called from a mobile browser

isMobileView
public static boolean isMobileView()

Checks whether the current request is a mobile view

setDisableMobile
public void setDisableMobile(boolean disabled)

Sets to disable the mobile support

setMobileView
public static void setMobileView(javax.servlet.http.HttpServletRequest request, java.lang.Boolean mobileView)

Sets a flag to indicate whether or not the current request is a mobile view.

  • No labels