Documentation

Mobile

Mobile class handles mobile devices.

Class methods

Class Description Available from version
getApiVersion Set value self::$apiVersion - API version
getDeviceHeight Gets value deviceHeight - device screen height.
getDeviceWidth Gets value deviceWidth - device screen width.
getIniScale Gets value iniScale (parameter initial-scale for viewport meta tag - original page scale).
getIPadViewPort Gets value viewport-metadata for Apple iPad.
getLargeScreenSupport Gets value largeScreenSupport.
getLargeScreenViewPort Returns viewport meta-tag value for tablets running Android.
getMaxScale Returns value maxScale.
getMinScale Returns value minScale.
getPgVersion Returns version PhoneGap.
getPixelRatio Gets value pixelRatio.
getPlatform Gets value self::platform.
getScale Gets value scale.
getScreenCategory Gets value deviceDpi.
getTargetDpi Gets dpi value for viewport meta tag.
getViewPort Used for getting current value content="" for viewport meta tag.
getViewPortLandscape Used for getting viewport meta tag value for landscape mode.
getViewPortPortrait Used for getting viewport meta tag value for portrait mode.
isAppBackground Returns true, when mobile app executed background mode query.
isLarge Returns true, when device has a large-size screen (LARGE or XLARGE).
PrepareStrToJson Converts string into UTF-8 and returns it.
setDeviceHeight Sets value for deviceHeight.
setDeviceWidth Sets value for deviceWidth.
setIniScale Sets value for iniScale (parameter initial-scale of viewport meta-tag - original page scale).
setLargeScreenSupport Sets value for largeScreenSupport.
setMaxScale Sets value for maxScale (parameter maximum-scale in viewport meta tag).
setMinScale Sets value for minScale (parameter minimum-scale in viewport meta tag).
setScale Sets value for scale.


© «Bitrix24», 2001-2022
Up