|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nativex.advertiser.DeviceManager
public class DeviceManager
The DeviceManager class handles accessing underlying data from the Android device. Access to this data is provided by the static getDeviceInstance() method.
Field Summary | |
---|---|
private Context |
context
|
private static Device |
device
|
private static String |
deviceId
|
private static DeviceManager |
deviceManager
|
Constructor Summary | |
---|---|
private |
DeviceManager(Context context)
|
Method Summary | |
---|---|
private String |
getAndroidDeviceId()
Returns the AndroidDeviceId (IMEI) for this Android device. |
private String |
getAndroidId()
Returns the device AndroidId. |
private String |
getDeviceId()
This method fetches DeviceId from SharedPreferences. |
static Device |
getDeviceInstance(Context context)
Returns a populated instance of the device object that represents the device that we are currently running. |
protected Device |
getDeviceInstance(Device mockDevice)
Provided for unit test purposes. |
private String |
getOsVersion()
Retrieves the version of the Android OS installed on this device. |
private boolean |
isHacked()
Is this device running as root? |
static void |
release()
Releases the manager. |
static void |
updateDeviceId()
|
private String |
verifyVersionString(String version)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Device device
private Context context
private static DeviceManager deviceManager
private static String deviceId
Constructor Detail |
---|
private DeviceManager(Context context)
Method Detail |
---|
public static Device getDeviceInstance(Context context)
private String getOsVersion()
String
. The Android OS version.private String verifyVersionString(String version)
protected Device getDeviceInstance(Device mockDevice)
mockDevice
- Device
. A device instance with mock data.
Device
. The mock device instance.public static void updateDeviceId()
private boolean isHacked()
private String getAndroidDeviceId()
private String getAndroidId()
private String getDeviceId()
public static void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |