Class DeviceInfoImpl
java.lang.Object
org.prebid.mobile.rendering.sdk.BaseManager
org.prebid.mobile.rendering.sdk.deviceData.managers.DeviceInfoImpl
- All Implemented Interfaces:
DeviceInfoManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck the state to have ability to save picture on device.voidAllow to create new calendar event.Get the device carrierfloatCheck the device screen densityintGet the device orientation.Get the mcc-mncintGet the screen height.intGet the screen width.booleanhasGps()Checks if the device can use location featuresbooleanCheck the state that device has telephony to do calls/smsbooleanisActivityOrientationLocked(android.content.Context context) booleanisPermissionGranted(String permission) Check if is permission granted.booleanGet device screen lock state.booleanGet device screen state.booleanisTablet()Checks if the device is a tabletvoidAllow to play video inside internal playervoidstorePicture(String url) Allow to store picture on device.Methods inherited from class org.prebid.mobile.rendering.sdk.BaseManager
getContext
-
Constructor Details
-
DeviceInfoImpl
public DeviceInfoImpl(android.content.Context context)
-
-
Method Details
-
hasTelephony
public boolean hasTelephony()Description copied from interface:DeviceInfoManagerCheck the state that device has telephony to do calls/sms- Specified by:
hasTelephonyin interfaceDeviceInfoManager- Returns:
- true if has telephony
-
getMccMnc
Description copied from interface:DeviceInfoManagerGet the mcc-mnc- Specified by:
getMccMncin interfaceDeviceInfoManager- Returns:
- the mcc-mnc
-
getCarrier
Description copied from interface:DeviceInfoManagerGet the device carrier- Specified by:
getCarrierin interfaceDeviceInfoManager- Returns:
- the carrier
-
isPermissionGranted
Description copied from interface:DeviceInfoManagerCheck if is permission granted.- Specified by:
isPermissionGrantedin interfaceDeviceInfoManager- Parameters:
permission- the permission name- Returns:
- true, if is permission granted
-
getDeviceOrientation
public int getDeviceOrientation()Description copied from interface:DeviceInfoManagerGet the device orientation. Return values can be compared to android.content.res.Configuration orientation values- Specified by:
getDeviceOrientationin interfaceDeviceInfoManager- Returns:
- the device orientation
- See Also:
-
getScreenWidth
public int getScreenWidth()Description copied from interface:DeviceInfoManagerGet the screen width.- Specified by:
getScreenWidthin interfaceDeviceInfoManager- Returns:
- the screen width
-
getScreenHeight
public int getScreenHeight()Description copied from interface:DeviceInfoManagerGet the screen height.- Specified by:
getScreenHeightin interfaceDeviceInfoManager- Returns:
- the screen height
-
isScreenOn
public boolean isScreenOn()Description copied from interface:DeviceInfoManagerGet device screen state.- Specified by:
isScreenOnin interfaceDeviceInfoManager- Returns:
- true if screen is on
-
isScreenLocked
public boolean isScreenLocked()Description copied from interface:DeviceInfoManagerGet device screen lock state.- Specified by:
isScreenLockedin interfaceDeviceInfoManager- Returns:
- true if screen is locked
-
isActivityOrientationLocked
public boolean isActivityOrientationLocked(android.content.Context context) - Specified by:
isActivityOrientationLockedin interfaceDeviceInfoManager- Parameters:
context- activity context.- Returns:
- true if activity is locked in portrait || landscape (including reverse portrait and reverse landscape)
-
createCalendarEvent
Description copied from interface:DeviceInfoManagerAllow to create new calendar event.- Specified by:
createCalendarEventin interfaceDeviceInfoManager- Parameters:
event- is calendar event filled object
-
storePicture
Description copied from interface:DeviceInfoManagerAllow to store picture on device.- Specified by:
storePicturein interfaceDeviceInfoManager- Parameters:
url- network URL to the picture- Throws:
Exception- if there is
-
playVideo
Description copied from interface:DeviceInfoManagerAllow to play video inside internal player- Specified by:
playVideoin interfaceDeviceInfoManager- Parameters:
url- network URL to the videocontext-
-
canStorePicture
public boolean canStorePicture()Description copied from interface:DeviceInfoManagerCheck the state to have ability to save picture on device.- Specified by:
canStorePicturein interfaceDeviceInfoManager- Returns:
- true if can process with picture saving
-
getDeviceDensity
public float getDeviceDensity()Description copied from interface:DeviceInfoManagerCheck the device screen density- Specified by:
getDeviceDensityin interfaceDeviceInfoManager- Returns:
- float device density
-
hasGps
public boolean hasGps()Description copied from interface:DeviceInfoManagerChecks if the device can use location features- Specified by:
hasGpsin interfaceDeviceInfoManager- Returns:
- true if location feature is available
-
isTablet
public boolean isTablet()Description copied from interface:DeviceInfoManagerChecks if the device is a tablet- Specified by:
isTabletin interfaceDeviceInfoManager- Returns:
- true if it is a tablet
-