You can set a device name for
a mobile app using the Aternity Mobile SDK, to display custom device names in the
dashboards.
In Android,
the Aternity
class provides an instance
method called setDeviceName
for setting the
device name.
For
example, you can use setDeviceName
to
implement your company's device naming policy on employees'
personal devices.
In addition to using this
method, you can also set this property when the Android app initializes
with init
and setting the property ATERNITY_CONFIG_DEVICE_NAME
.
Example of device names for mobile devices displayed in the dashboard
Since this is an instance method, you need
to call this with an instantiated object. The Aternity
class provides the
getInstance
method which returns a singleton object. You
should call the class's methods using the singleton object, to avoid manually
creating and maintaining the Aternity
object.
Method Definition
In Android,
the Aternity
class provides an instance
method called setDeviceName
for setting the
device name.
void setDeviceName(String name);
Parameter |
Description |
name
|
Set this to be the device
name you want to appear in the dashboards, defined as a string.
|
Example
//Since this is an instance method, use getInstance to return a singleton object.
Aternity.getInstance().setDeviceName("Brandi_Calton_Tablet");