public class

DeviceProperties

extends Object
java.lang.Object
   ↳ com.nexmo.sdk.conversation.device.DeviceProperties

Class Overview

Utility class for accessing device properties.

Summary

Public Constructors
DeviceProperties()
Public Methods
static String getAndroid_ID(Context context)
This method is deprecated. No replacement.
static String getApiLevel()
Get the Android API version.
static String getLanguage()
Get the user's preferred locale language.
static String getUserid(Context context)
static void resetUserId(Context context)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DeviceProperties ()

Public Methods

public static String getAndroid_ID (Context context)

This method is deprecated.
No replacement.

A randomly generated 64-bit number on the device's first boot that remains constant for the lifetime of the device.

Returns
  • The device ANDROID_ID, or null if the context is not supplied.

public static String getApiLevel ()

Get the Android API version.

Returns
  • The Android API version.

public static String getLanguage ()

Get the user's preferred locale language. The format is language code and country code, separated by dash.

Since the user's locale changes dynamically, avoid caching this value.

Returns
  • The user's preferred language.

public static String getUserid (Context context)

public static void resetUserId (Context context)