agora_chat_SDK  3.8.2
agorajavachatSDK
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

Multi-device information Can use ChatClient#getLoggedInDevicesFromServer(String, String) to get info

Member Function Documentation

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

Return the device type Such as:"HUAWEICOL-AL10"

Returns
Device type
String io.agora.chat.DeviceInfo.getDeviceUUID ( )

Return the device's UUID

Returns
Device's UUID
String io.agora.chat.DeviceInfo.getResource ( )

Get other side device information Through the device info, we can distinguish the device type, such as:

    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
    }
Returns
Other side device information

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