|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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_SCREEN
capability type, then that means that if you invoke
DeviceCapability.isScreenSupported()
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.
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 |
---|
void supportedChanged(boolean changedTo)
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.
changedTo
- If true
, the device capability type is now
supported; if false
, the capability type is now not
supported.void allowedChanged(boolean changedTo)
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.
changedTo
- If true
, the device capability type is now
allowed; if false
, the capability type is now not supported.void availableChanged(boolean changedTo)
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.
changedTo
- If true
, the device capability is now
availalbe; if false
, the capability type is now not
supported.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.