net.rim.blackberry.api.bbm.platform
Class BBMPlatformApplication

java.lang.Object
  |
  +--net.rim.blackberry.api.bbm.platform.Plugin
        |
        +--net.rim.blackberry.api.bbm.platform.BBMPlatformApplication

public class BBMPlatformApplication
extends Plugin

An application that needs to register with BBMPlatform needs to override this class. The application name that appears in BlackBerry Messenger will be taken from the ApplicationDescriptor of the invocable module as specified in this class.


 
Constructor Summary
BBMPlatformApplication(String UUID)
          Default constructor.
 
Method Summary
 int getDefaultSettings()
          Returns the default settings for the BBM Platform.
 int getInvocableApplicationDescriptorIndex()
          Returns the index of the ApplicationDescriptor element which can be used to invoke the application if it is not running.
 int getInvocableModuleHandle()
          Returns the module handle which can be used to invoke the application if it is not running.
 String getUUID()
          Returns the UUID.
 
Methods inherited from class net.rim.blackberry.api.bbm.platform.Plugin
getName
 

Constructor Detail

BBMPlatformApplication

public BBMPlatformApplication(String UUID)
Default constructor.
Parameters:
UUID - a 128-bit universally unique identifier for the application; must be 36 characters long It is used to uniquely identify the application (along with the vendor name and the application name) in the pre-promotion/test environment before the application is available in AppWorld. If the application exists in AppWorld, the UUID will not be used to identify the application. The same UUID should be used for future releases of the same application. If the UUID changes across different versions, two different versions of the same application will not be able to communicate with each other through the BBM Platform. See Generating a UUID for a sample UUID generator.
Throws:
IllegalArgumentException - if UUID is not 36 characters long
Since:
BBM SDK 1.0
Method Detail

getDefaultSettings

public int getDefaultSettings()
Returns the default settings for the BBM Platform. See BBMPlatformContext for available settings. These settings can be set only once when registering with the BBM Platform.
Returns:
default settings
Since:
BBM SDK 1.2

getInvocableApplicationDescriptorIndex

public int getInvocableApplicationDescriptorIndex()
Returns the index of the ApplicationDescriptor element which can be used to invoke the application if it is not running. The range of allowed indices is determined by the return value of CodeModuleManager.getApplicationDescriptors(getInvocableModuleHandle()).
Returns:
index of the ApplicationDescriptor element that will be used to invoke the application
Since:
BBM SDK 1.0

getInvocableModuleHandle

public int getInvocableModuleHandle()
Returns the module handle which can be used to invoke the application if it is not running. The application will be invoked if it receives an invitation or if an invitation is sent through a menu item in BlackBerry Messenger. By default, the value returned is for the module which registers with BlackBerry Messenger in BBMPlatformManager.register(BBMPlatformApplication). If the value changes after the call to the above method, it will be ignored. The value may not be accurate if this value is checked outside of this call. If your application should be invoked through a different module, override this method.
Returns:
moduleHandle as returned by CodeModuleManager.getModuleHandle("my_invocable_module_name");
Since:
BBM SDK 1.0

getUUID

public String getUUID()
Returns the UUID.
Returns:
UUID
Since:
BBM SDK 1.0



Copyright 1999- 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.