net.rim.blackberry.api.cradle
Class CradleHandlerRegistry

java.lang.Object
  extended by net.rim.blackberry.api.cradle.CradleHandlerRegistry

Deprecated. Use AccessoryManager. Any registrations are mapped to the AccessoryManager.

public class CradleHandlerRegistry
extends Object

Registry for cradle handlers. A cradle handler is an application that is a candidate to be started when a cradle of the corresponding type is connected.

If any handlers are registered for a cradle type, the device user will be presented with a selection dialog when such a cradle is connected. The user can select which handler to use, if any. The selected handler application will then be started. Also, the selected handler application will be automatically started the next time the cradle of the specified type is connected if the user indicated in the selection dialog to take the same action in the future.

Since:
BlackBerry API 6.0.0

Method Summary
static void registerHandler(int cradleType, ApplicationDescriptor handler)
          Deprecated. Use AccessoryManager.registerApplication(java.lang.String, net.rim.device.api.system.ApplicationDescriptor). Any registrations are mapped to the AccessoryManager.
static void unregisterHandler(int cradleType, ApplicationDescriptor handler)
          Deprecated. Use AccessoryManager.unregisterApplication(java.lang.String, net.rim.device.api.system.ApplicationDescriptor). Any registrations are mapped to the AccessoryManager.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

registerHandler

public static void registerHandler(int cradleType,
                                   ApplicationDescriptor handler)
                            throws UnsupportedOperationException,
                                   IllegalArgumentException
Deprecated. Use AccessoryManager.registerApplication(java.lang.String, net.rim.device.api.system.ApplicationDescriptor). Any registrations are mapped to the AccessoryManager.

Registers a handler for a given cradle type.

Parameters:
cradleType - Type of the cradle. One of the TYPE_ constants in CradleProtocol.
handler - Application that is a candidate to be started when a cradle of type cradleType is connected.
Throws:
IllegalArgumentException - if cradle type is equal to CradleProtocol.TYPE_NONE
UnsupportedOperationException - if cradle connection can't be detected on this device
Since:
BlackBerry API 6.0.0

unregisterHandler

public static void unregisterHandler(int cradleType,
                                     ApplicationDescriptor handler)
                              throws IllegalArgumentException
Deprecated. Use AccessoryManager.unregisterApplication(java.lang.String, net.rim.device.api.system.ApplicationDescriptor). Any registrations are mapped to the AccessoryManager.

Unregisters a cradle handler.

Parameters:
cradleType - Type of the cradle. One of the TYPE_ constants in CradleProtocol.
handler - Application that was previously registered through CradleHandlerRegistry.registerHandler(int, ApplicationDescriptor).
Throws:
IllegalArgumentException - if cradle type is equal to CradleProtocol.TYPE_NONE
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