Interface DeviceInfoManager
- All Known Implementing Classes:
DeviceInfoImpl
public interface DeviceInfoManager
Manager for retrieving device information.
- See Also:
-
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.
-
Method Details
-
getMccMnc
String getMccMnc()Get the mcc-mnc- Returns:
- the mcc-mnc
-
getCarrier
String getCarrier()Get the device carrier- Returns:
- the carrier
-
isPermissionGranted
Check if is permission granted.- Parameters:
permission- the permission name- Returns:
- true, if is permission granted
-
getDeviceOrientation
int getDeviceOrientation()Get the device orientation. Return values can be compared to android.content.res.Configuration orientation values- Returns:
- the device orientation
-
getScreenWidth
int getScreenWidth()Get the screen width.- Returns:
- the screen width
-
getScreenHeight
int getScreenHeight()Get the screen height.- Returns:
- the screen height
-
isScreenOn
boolean isScreenOn()Get device screen state.- Returns:
- true if screen is on
-
isScreenLocked
boolean isScreenLocked()Get device screen lock state.- Returns:
- true if screen is locked
-
isActivityOrientationLocked
boolean isActivityOrientationLocked(android.content.Context context) - Parameters:
context- activity context.- Returns:
- true if activity is locked in portrait || landscape (including reverse portrait and reverse landscape)
-
createCalendarEvent
Allow to create new calendar event.- Parameters:
event- is calendar event filled object
-
storePicture
Allow to store picture on device.- Parameters:
url- network URL to the picture- Throws:
Exception- if there is
-
playVideo
Allow to play video inside internal player- Parameters:
url- network URL to the videocontext-- Throws:
IOException- if there is
-
canStorePicture
boolean canStorePicture()Check the state to have ability to save picture on device.- Returns:
- true if can process with picture saving
-
hasTelephony
boolean hasTelephony()Check the state that device has telephony to do calls/sms- Returns:
- true if has telephony
-
getDeviceDensity
float getDeviceDensity()Check the device screen density- Returns:
- float device density
-
hasGps
boolean hasGps()Checks if the device can use location features- Returns:
- true if location feature is available
-
isTablet
boolean isTablet()Checks if the device is a tablet- Returns:
- true if it is a tablet
-