Package com.zendesk.sdk.model
Class DeviceInfo
- java.lang.Object
-
- com.zendesk.sdk.model.DeviceInfo
-
public class DeviceInfo extends java.lang.ObjectWrapper for device information.One source of information is
android.os.Buildandandroid.os.Build.VERSION. We also includeMemoryInformation
-
-
Constructor Summary
Constructors Constructor and Description DeviceInfo(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Map<java.lang.String,java.lang.String>getDeviceInfoAsMap()Create a key value map of device informationjava.lang.StringgetModelDeviceName()Gets the device name.java.lang.StringgetModelManufacturer()Gets the manufacturer of the device like HTC, Samsung etc.java.lang.StringgetModelName()Gets the model name of the device.intgetVersionCode()Gets the API level of the OSjava.lang.StringgetVersionName()Gets the OS version name of the device.java.lang.StringtoString()
-
-
-
Method Detail
-
getModelName
public java.lang.String getModelName()
Gets the model name of the device. This will be the model name that is most recognisable by users- Returns:
- A descriptive name of the device like "HTC One"
-
getVersionName
public java.lang.String getVersionName()
Gets the OS version name of the device.- Returns:
- the OS version of the device, like 4.4.2
-
getVersionCode
public int getVersionCode()
Gets the API level of the OS- Returns:
- the api level of the OS
-
getModelManufacturer
public java.lang.String getModelManufacturer()
Gets the manufacturer of the device like HTC, Samsung etc.- Returns:
- the manufacturer of the device.
-
getModelDeviceName
public java.lang.String getModelDeviceName()
Gets the device name. This is usually a code-name like m7 for the HTC One- Returns:
- The device name
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDeviceInfoAsMap
public java.util.Map<java.lang.String,java.lang.String> getDeviceInfoAsMap()
Create a key value map of device information- Returns:
- The device info as a map
-
-