public class DeviceManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DeviceManager.DeviceInfo |
static interface |
DeviceManager.OnUpdateDeviceListFinishedListener
Interface definition for a callback to be invoked when update device list finished
|
Modifier and Type | Method and Description |
---|---|
java.util.List<DeviceManager.DeviceInfo> |
getDeviceInfoList()
Get all device information of the current device
|
static DeviceManager |
getInstance() |
static java.lang.String |
getJNIVersion()
Get the version of jni library
|
static java.lang.String |
getLibraryVersion()
Get the version of libgxiapi.so
|
java.lang.String |
getVersion()
Get galaxy java sdk version
|
Device |
openDeviceByIndex(int index)
Open device by index, Access mode : control
When the index is greater than the number of devices, it will try to re-enumerate the device.
|
Device |
openDeviceByIndex(int index,
EnumDefineSet.AccessMode accessMode)
Open device by index
When the index is greater than the number of devices, it will try to re-enumerate the device.
|
Device |
openDeviceByIP(java.lang.String ip,
EnumDefineSet.AccessMode accessMode)
Open device by device ip address
|
Device |
openDeviceByMAC(java.lang.String mac,
EnumDefineSet.AccessMode accessMode)
Open device by device mac address
|
Device |
openDeviceBySN(java.lang.String sn)
Open device by serial number(SN), Access mode : control
When serial number(SN) is not found in the device list, it will try to re-enumerate the device.
|
Device |
openDeviceBySN(java.lang.String sn,
EnumDefineSet.AccessMode accessMode)
Open device by serial number(SN)
When serial number(SN) is not found in the device list, it will try to re-enumerate the device.
|
Device |
openDeviceByUserID(java.lang.String userID)
Open device by user ID, Access mode : control
When user ID is not found in the device list, it will try to re-enumerate the device.
|
Device |
openDeviceByUserID(java.lang.String userID,
EnumDefineSet.AccessMode accessMode)
Open device by user ID
When user ID is not found in the device list, it will try to re-enumerate the device.
|
void |
setOnUpdateDeviceListFinishedListener(DeviceManager.OnUpdateDeviceListFinishedListener onUpdateDeviceListFinishedListener)
Register a callback to be invoked when update device list finished
|
void |
startUpdateAllDeviceList(Context context,
int timeout)
This method will invoke __updateAllDeviceList after request permission finished
|
void |
startUpdateDeviceList(Context context,
int timeout)
This method will invoke __updateDeviceList after request permission finished
|
java.util.List<DeviceManager.DeviceInfo> |
updateAllDeviceList(int timeout)
Enumerate devices on different network segments
|
java.util.List<DeviceManager.DeviceInfo> |
updateDeviceList(int timeout)
Enumerate the same network segment devices
|
public static DeviceManager getInstance() throws ExceptionSet
ExceptionSet
public java.util.List<DeviceManager.DeviceInfo> updateDeviceList(int timeout) throws ExceptionSet
timeout
- Enumeration timeout, range:[0, 2147483647]ExceptionSet
public java.util.List<DeviceManager.DeviceInfo> updateAllDeviceList(int timeout) throws ExceptionSet
timeout
- Enumeration timeout, range:[0, 2147483647]ExceptionSet
public void startUpdateDeviceList(Context context, int timeout) throws ExceptionSet
context
- Interface to global information about an application environment.timeout
- Enumeration timeout, range:[0, 2147483647]ExceptionSet
public void startUpdateAllDeviceList(Context context, int timeout) throws ExceptionSet
context
- Interface to global information about an application environment.timeout
- Enumeration timeout, range:[0, 2147483647]ExceptionSet
public void setOnUpdateDeviceListFinishedListener(DeviceManager.OnUpdateDeviceListFinishedListener onUpdateDeviceListFinishedListener)
onUpdateDeviceListFinishedListener
- Listener for update device list finishedpublic java.util.List<DeviceManager.DeviceInfo> getDeviceInfoList()
public Device openDeviceByIndex(int index, EnumDefineSet.AccessMode accessMode) throws ExceptionSet
index
- device index must start from 1accessMode
- The mode of open device[READONLY CONTROL EXCLUSIVE]ExceptionSet
public Device openDeviceByIndex(int index) throws ExceptionSet
index
- device index must start from 1ExceptionSet
public Device openDeviceBySN(java.lang.String sn, EnumDefineSet.AccessMode accessMode) throws ExceptionSet
sn
- The device serial number(SN)accessMode
- The mode of open device[READONLY CONTROL EXCLUSIVE]ExceptionSet
public Device openDeviceBySN(java.lang.String sn) throws ExceptionSet
sn
- The device serial number(SN)ExceptionSet
public Device openDeviceByUserID(java.lang.String userID, EnumDefineSet.AccessMode accessMode) throws ExceptionSet
userID
- The user defined name, length must be greater than 0accessMode
- The mode of open device[READONLY CONTROL EXCLUSIVE]ExceptionSet
public Device openDeviceByUserID(java.lang.String userID) throws ExceptionSet
userID
- The user defined name, length must be greater than 0ExceptionSet
public Device openDeviceByIP(java.lang.String ip, EnumDefineSet.AccessMode accessMode) throws ExceptionSet
ip
- The device ip addressaccessMode
- The mode of open device[READONLY CONTROL EXCLUSIVE]ExceptionSet
public Device openDeviceByMAC(java.lang.String mac, EnumDefineSet.AccessMode accessMode) throws ExceptionSet
mac
- The device mac addressaccessMode
- The mode of open device[READONLY CONTROL EXCLUSIVE]ExceptionSet
public static java.lang.String getLibraryVersion()
public static java.lang.String getJNIVersion()
public java.lang.String getVersion()