public class DeviceBridge extends BaseSystemBridge implements IDevice, APIBridge
apiGroup| Constructor and Description |
|---|
DeviceBridge(IDevice delegate)
Constructor with delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addButtonListener(IButtonListener listener)
Register a new listener that will receive button events.
|
void |
addDeviceOrientationListener(IDeviceOrientationListener listener)
Add a listener to start receiving device orientation change events.
|
IDevice |
getDelegate()
Get the delegate implementation.
|
DeviceInfo |
getDeviceInfo()
Returns the device information for the current device executing the runtime.
|
Locale |
getLocaleCurrent()
Gets the current Locale for the device.
|
ICapabilitiesOrientation |
getOrientationCurrent()
Returns the current orientation of the device.
|
APIResponse |
invoke(APIRequest request)
Invokes the given method specified in the API request object.
|
void |
removeButtonListener(IButtonListener listener)
De-registers an existing listener from receiving button events.
|
void |
removeButtonListeners()
Removed all existing listeners from receiving button events.
|
void |
removeDeviceOrientationListener(IDeviceOrientationListener listener)
Remove a listener to stop receiving device orientation change events.
|
void |
removeDeviceOrientationListeners()
Remove all listeners receiving device orientation events.
|
void |
setDelegate(IDevice delegate)
Set the delegate implementation.
|
getAPIGroup, getAPIVersion, getJSONParserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAPIGroup, getAPIVersionpublic DeviceBridge(IDevice delegate)
delegate - The delegate implementing platform specific functions.public final IDevice getDelegate()
public final void setDelegate(IDevice delegate)
delegate - The delegate implementing platform specific functions.public void addButtonListener(IButtonListener listener)
addButtonListener in interface IDevicelistener - to be registered.public void addDeviceOrientationListener(IDeviceOrientationListener listener)
addDeviceOrientationListener in interface IDevicelistener - Listener to add to receive orientation change events.public DeviceInfo getDeviceInfo()
getDeviceInfo in interface IDevicepublic Locale getLocaleCurrent()
getLocaleCurrent in interface IDevicepublic ICapabilitiesOrientation getOrientationCurrent()
getOrientationCurrent in interface IDevicepublic void removeButtonListener(IButtonListener listener)
removeButtonListener in interface IDevicelistener - to be removed.public void removeButtonListeners()
removeButtonListeners in interface IDevicepublic void removeDeviceOrientationListener(IDeviceOrientationListener listener)
removeDeviceOrientationListener in interface IDevicelistener - Listener to remove from receiving orientation change events.public void removeDeviceOrientationListeners()
removeDeviceOrientationListeners in interface IDevicepublic APIResponse invoke(APIRequest request)
invoke in interface APIBridgeinvoke in class BaseSystemBridgerequest - APIRequest object containing method name and parameters.