hyphenate_SDK3.0
3.8.6.1
hyphenate java IM SDK
|
Inherits com.hyphenate.chat.EMBase< T >.
Public Member Functions | |
String | getResource () |
String | getDeviceUUID () |
String | getDeviceName () |
Multi-device information Can use EMClient#getLoggedInDevicesFromServer(String, String) to get info
String com.hyphenate.chat.EMDeviceInfo.getDeviceName | ( | ) |
Return the device type Such as:"HUAWEICOL-AL10"
String com.hyphenate.chat.EMDeviceInfo.getDeviceUUID | ( | ) |
Return the device's UUID
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 }