net.rim.device.api.system.capability
Interface DeviceCapabilityListener


public interface DeviceCapabilityListener

Implementors of this interface can listen for changes in status to specific device capability types.

The interface defines methods a specific device capability can invoke in response to changes in whether it is supported, allowed, or available.

Notice that the values passed into the various methods in this interface are the same values returned from the device capability state predicate methods. For example, if the framework invokes supportedChanged(true) on a capability listener that registers against the DeviceCapability.TYPE_TOUCH_CLICK capability type, then that means that if you invoke isSupported(TYPE_TOUCH_CLICK) it should now return true.

Listening for capability changes: If you want to listen for such changes, provide an implementation for this interface and then register the listener with one of the listener registration methods in DeviceCapability: you can use DeviceCapability.addListener(Application,long,DeviceCapabilityListener) or one of convenience methods specific to the various capability types.

Unregistering a listener: When you no longer need to listen for capability state changes, use DeviceCapability.removeListener(long,DeviceCapabilityListener) to unregister your listener. You can also use one of the convenience methods specific to the appropriate compatibility type. However, note that you must unregister your listener from the same capability type that you registered it with.

Since:
BlackBerry API 6.0.0

Method Summary
 void allowedChanged(boolean changedTo)
          Notifies this listener when the observed capability type has changed its allowance state.
 void availableChanged(boolean changedTo)
          Notifies this listener when the observed capability type has changed its availability state.
 void supportedChanged(boolean changedTo)
          Notifies this listener when the observed capability type has changed its support state.
 



Method Detail

supportedChanged

void supportedChanged(boolean changedTo)
Notifies this listener when the observed capability type has changed its support state.

When a device capability type moves from supported to un-supported, or vice-versa, the framework will invoke this method on all listeners registered against that capability type.

Parameters:
changedTo - If true, the device capability type is now supported; if false, the capability type is now not supported.
Since:
BlackBerry API 6.0.0

allowedChanged

void allowedChanged(boolean changedTo)
Notifies this listener when the observed capability type has changed its allowance state.

When a device capability type moves from allowed to not allowed, or vice-versa, the framework will invoke this method on all listeners registered against that capability type.

Parameters:
changedTo - If true, the device capability type is now allowed; if false, the capability type is now not supported.
Since:
BlackBerry API 6.0.0

availableChanged

void availableChanged(boolean changedTo)
Notifies this listener when the observed capability type has changed its availability state.

When a device capability type moves from available to not avilable, or vice-versa, the framework will invoke this method on all listeners registered against that capability type.

Parameters:
changedTo - If true, the device capability is now availalbe; if false, the capability type is now not supported.
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal