Package com.zendesk.sdk.model
Class DeviceInfo
- java.lang.Object
-
- com.zendesk.sdk.model.DeviceInfo
-
public class DeviceInfo extends java.lang.Object
Wrapper for device information.One source of information is
android.os.Build
andandroid.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.String
getModelDeviceName()
Gets the device name.java.lang.String
getModelManufacturer()
Gets the manufacturer of the device like HTC, Samsung etc.java.lang.String
getModelName()
Gets the model name of the device.int
getVersionCode()
Gets the API level of the OSjava.lang.String
getVersionName()
Gets the OS version name of the device.java.lang.String
toString()
-
-
-
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:
toString
in 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
-
-