hyphenate_SDK3.0  3.8.6.1
hyphenate java IM SDK
Public Member Functions | List of all members
com.hyphenate.chat.EMDeviceInfo Class Reference

Inherits com.hyphenate.chat.EMBase< T >.

Public Member Functions

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

Detailed Description

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

Member Function Documentation

◆ getDeviceName()

String com.hyphenate.chat.EMDeviceInfo.getDeviceName ( )

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

Returns
Device type

◆ getDeviceUUID()

String com.hyphenate.chat.EMDeviceInfo.getDeviceUUID ( )

Return the device's UUID

Returns
Device's UUID

◆ getResource()

String com.hyphenate.chat.EMDeviceInfo.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: