public interface AntennaDevice extends Device
AntennaDevice interface defines the APIs for controlling Antenna devices in applications.
Implementations providing Antenna services must supply a concrete class implementing this interface.
To obtain a Antenna device object from the POSTerminal, use the following code:
AntennaDevice antennaDevice =
(AntennaDevice) POSTerminal.getInstance().getDevice("com.cloudpos.device.antenna");
The identifier "com.cloudpos.device.antenna" is used to specify the Antenna device, as defined by the specific implementation.
Applications can control the antenna device using this interface and must request the necessary permissions:
<uses-permission android:name="android.permission.CLOUDPOS_MCUCTL"/>
Device| Modifier and Type | Interface and Description |
|---|---|
static class |
AntennaDevice.AntennaMode
Defines the operational modes of the antenna.
|
| Modifier and Type | Method and Description |
|---|---|
AntennaDevice.AntennaMode |
getAntennaMode()
Retrieves the currently active antenna mode.
|
void |
setAntennaMode(AntennaDevice.AntennaMode antennaMode)
Switch to internal antenna or external antenna
|
cancelRequest, close, getFailCount, getUsageCount, openAntennaDevice.AntennaMode getAntennaMode() throws DeviceException
AntennaDevice.AntennaMode.INTERNAL or AntennaDevice.AntennaMode.EXTERNAL.DeviceException - for standard errors as documented in DeviceException.void setAntennaMode(AntennaDevice.AntennaMode antennaMode) throws DeviceException
antennaMode - Target mode, either AntennaDevice.AntennaMode.INTERNAL or AntennaDevice.AntennaMode.EXTERNALDeviceException - for standard errors as documented in DeviceException.