Class DeviceInfoImpl
- java.lang.Object
-
- org.prebid.mobile.rendering.sdk.BaseManager
-
- org.prebid.mobile.rendering.sdk.deviceData.managers.DeviceInfoImpl
-
- All Implemented Interfaces:
DeviceInfoManager,Manager
public class DeviceInfoImpl extends BaseManager implements DeviceInfoManager
-
-
Constructor Summary
Constructors Constructor Description DeviceInfoImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanStorePicture()Check the state to have ability to save picture on device.voidcreateCalendarEvent(CalendarEventWrapper event)Allow to create new calendar event.voiddispose()Dispose manager and release all necessary resources.java.lang.StringgetCarrier()Get the device carrierfloatgetDeviceDensity()Check the device screen densityintgetDeviceOrientation()Get the device orientation.java.lang.StringgetMccMnc()Get the mcc-mncintgetScreenHeight()Get the screen height.intgetScreenWidth()Get the screen width.booleanhasGps()Checks if the device can use location featuresbooleanhasTelephony()Check the state that device has telephony to do calls/smsvoidinit(android.content.Context context)Initialize manager.booleanisActivityOrientationLocked(android.content.Context context)booleanisPermissionGranted(java.lang.String permission)Check if is permission granted.booleanisScreenLocked()Get device screen lock state.booleanisScreenOn()Get device screen state.voidplayVideo(java.lang.String url, android.content.Context context)Allow to play video inside internal playervoidstorePicture(java.lang.String url)Allow to store picture on device.-
Methods inherited from class org.prebid.mobile.rendering.sdk.BaseManager
getContext, isInit
-
-
-
-
Method Detail
-
init
public void init(android.content.Context context)
Description copied from class:BaseManagerInitialize manager.- Specified by:
initin interfaceManager- Overrides:
initin classBaseManager- Parameters:
context- the context for which manager will be initialized.- See Also:
DeviceInfoManager
-
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
public java.lang.String getMccMnc()
Description copied from interface:DeviceInfoManagerGet the mcc-mnc- Specified by:
getMccMncin interfaceDeviceInfoManager- Returns:
- the mcc-mnc
- See Also:
DeviceInfoManager
-
getCarrier
public java.lang.String getCarrier()
Description copied from interface:DeviceInfoManagerGet the device carrier- Specified by:
getCarrierin interfaceDeviceInfoManager- Returns:
- the carrier
-
isPermissionGranted
public boolean isPermissionGranted(java.lang.String permission)
Description copied from interface:DeviceInfoManagerCheck if is permission granted.- Specified by:
isPermissionGrantedin interfaceDeviceInfoManager- Parameters:
permission- the permission name- Returns:
- true, if is permission granted
- See Also:
DeviceInfoManager
-
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:
DeviceInfoManager
-
dispose
public void dispose()
Description copied from class:BaseManagerDispose manager and release all necessary resources.- Specified by:
disposein interfaceManager- Overrides:
disposein classBaseManager- See Also:
DeviceInfoManager
-
getScreenWidth
public int getScreenWidth()
Description copied from interface:DeviceInfoManagerGet the screen width.- Specified by:
getScreenWidthin interfaceDeviceInfoManager- Returns:
- the screen width
- See Also:
DeviceInfoManager
-
getScreenHeight
public int getScreenHeight()
Description copied from interface:DeviceInfoManagerGet the screen height.- Specified by:
getScreenHeightin interfaceDeviceInfoManager- Returns:
- the screen height
- See Also:
DeviceInfoManager
-
isScreenOn
public boolean isScreenOn()
Description copied from interface:DeviceInfoManagerGet device screen state.- Specified by:
isScreenOnin interfaceDeviceInfoManager- Returns:
- true if screen is on
- See Also:
DeviceInfoManager
-
isScreenLocked
public boolean isScreenLocked()
Description copied from interface:DeviceInfoManagerGet device screen lock state.- Specified by:
isScreenLockedin interfaceDeviceInfoManager- Returns:
- true if screen is locked
- See Also:
DeviceInfoManager
-
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
public void createCalendarEvent(CalendarEventWrapper event)
Description copied from interface:DeviceInfoManagerAllow to create new calendar event.- Specified by:
createCalendarEventin interfaceDeviceInfoManager- Parameters:
event- is calendar event filled object- See Also:
DeviceInfoManager
-
storePicture
public void storePicture(java.lang.String url) throws java.lang.ExceptionDescription copied from interface:DeviceInfoManagerAllow to store picture on device.- Specified by:
storePicturein interfaceDeviceInfoManager- Parameters:
url- network URL to the picture- Throws:
java.lang.Exception- if there is- See Also:
DeviceInfoManager
-
playVideo
public void playVideo(java.lang.String url, android.content.Context context)Description copied from interface:DeviceInfoManagerAllow to play video inside internal player- Specified by:
playVideoin interfaceDeviceInfoManager- Parameters:
url- network URL to the video- See Also:
DeviceInfoManager
-
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
- See Also:
DeviceInfoManager
-
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
-
-