Chat SDK for Android v1.3.1
agora java chat SDK
Public Member Functions | List of all members
io.agora.chat.DeviceInfo Class Reference

Inherits io.agora.chat.EMBase< T >.

Public Member Functions

String getResource ()
 
String getDeviceUUID ()
 
String getDeviceName ()
 

Detailed Description

The Multi-device information. You can call ChatClient#getLoggedInDevicesFromServer(String, String) to get the related information.

Member Function Documentation

◆ getDeviceName()

String io.agora.chat.DeviceInfo.getDeviceName ( )

Gets the device model name.If the user defines the device name, the device name is the user-defined one.

Returns
The device type. For example: "Pixel 6 Pro".

◆ getDeviceUUID()

String io.agora.chat.DeviceInfo.getDeviceUUID ( )

Gets the UUID of the device.

Returns
The UUID of the device.

◆ getResource()

String io.agora.chat.DeviceInfo.getResource ( )

Gets the information of the other logged in devices.

Through the device information, you can distinguish the device type, for example:

String deviceResource = getResource();
String deviceType = deviceResource.substring(0, deviceResource.indexOf("_"));
if(deviceType.equalsIgnoreCase("ios")) {
// iOS device
}else if(deviceType.equalsIgnoreCase("android")) {
// android device
}else if(deviceType.equalsIgnoreCase("web")) {
// web device
}else if(deviceType.equalsIgnoreCase("win")) {
// win device
}else if(deviceType.equalsIgnoreCase("iMac")) {
// mac device
}
String getResource()
Definition: DeviceInfo.java:43
Returns
The other devices' information.

The documentation for this class was generated from the following file: