|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
In order to access the BBM platform, an application should register with the BBMPlatformManager
by calling its registration method, which returns a BBMPlatformContext object.
BBMPlatformContext contains
information about the application registration and platform access status. To receive a notification
of any status changes, the application must attach a BBMPlatformContextListener to the
BBMPlatformContext object.
| Field Summary | ||
static int |
ACCESS_ALLOWED
Access permission status that indicates that the application has full access to BBM Social SDK. |
|
static int |
ACCESS_BLOCKED_BY_IT_POLICY
Access permission status that indicates that the application has been blocked by IT policy. |
|
static int |
ACCESS_BLOCKED_BY_RIM
Access permission status that indicates that the application has been blocked by RIM (the application has most likely violated the terms of use). |
|
static int |
ACCESS_BLOCKED_BY_USER
Access permission status that indicates that the application has been blocked by the user. |
|
static int |
ACCESS_BLOCKED_RESET_REQUIRED
Access permission status that indicates the user needs to reset their device in order for this application to continue the registration process. |
|
static int |
ACCESS_NO_DATA_COVERAGE
Access permission status that indicates that the application is pending registration because device is out of data coverage. |
|
static int |
ACCESS_REGISTER_WITH_UI_APPLICATION
Access permission status that indicates that the application needs to register using a UiApplication because user interaction is required. |
|
static int |
ACCESS_REREGISTRATION_REQUIRED
Access permission status that indicates the application needs to re-register with BBM Social SDK by calling BBMPlatformManager.register(BBMPlatformApplication). |
|
static int |
ACCESS_TEMPORARY_ERROR
Access permission status that indicates that the application is pending registration because of a temporary error. |
|
static int |
APP_ENVIRONMENT_APPWORLD
This constant indicates the application exists in AppWorld. |
|
static int |
APP_ENVIRONMENT_TEST
This constant indicates the application doesn't exist in App World. |
|
static int |
BBM_SDK_VER_1_0
Constant representing BBM SDK version 1.0 |
|
static int |
BBM_SDK_VER_1_2
Constant representing BBM SDK version 1.2 |
|
static int |
BBM_SDK_VER_1_3
Constant representing BBM SDK version 1.3 |
|
static int |
INVOKE_CHAT_MESSAGE
Invocation code indicating that the application was invoked by clicking a chat message TPA link in a BBM chat. |
|
static int |
INVOKE_PERSONAL_MESSAGE
Invocation code indicating that the application was invoked by clicking a personal message TPA link in a user's BBM profile. |
|
static int |
INVOKE_PROFILE_BOX
Invocation code indicating that the application was invoked by clicking a profile box header in a user's BBM profile. |
|
static int |
INVOKE_PROFILE_BOX_ITEM
Invocation code indicating that the application was invoked by clicking a profile box item in a user's BBM profile. |
|
static int |
SETTING_SHARECONTENT_SPLAT
This constant enables the BBM Platform to splat the application's home screen icon when MessagingService#shareContent(String, BBMPlatformData) request is received
while application is not running
This constant can be set by overriding BBMPlatformApplication.getDefaultSettings() |
|
| Method Summary | ||
int |
getAccessErrorCode()
Returns the access status code that indicates the current access status to the BBM Social SDK, |
|
int |
getAppEnvironment()
Tells if the application exists in AppWorld. |
|
ContactListService |
getContactListService()
Retrieves ContactListService registered with the BBM platform. |
|
MessagingService |
getMessagingService()
Retrieves MessagingService registered with BBM platform. |
|
SettingsManager |
getSettingsManager()
Retrieves SettingsManager registered with the BBM platform. |
|
UIService |
getUIService()
Retrieves UIService registered with BBM platform. |
|
UserProfile |
getUserProfile()
Retrieves this device user's profile. |
|
boolean |
isAccessAllowed()
Checks if the application is authorized to access BBM. |
|
void |
removeListener()
Removes a BBMPlatformContextListener from BBMPlatformContext. |
|
void |
requestAppSettings()
Brings the BBM settings screen for this application to the foreground. |
|
void |
requestBBMToForeground()
Requests to have the BBM application brought to the foreground. |
|
boolean |
requestUserPermission()
Deprecated. Use requestAppSettings(). |
|
void |
setListener(BBMPlatformContextListener listener)
Sets a BBMPlatformContextListener for the BBMPlatformContext. |
|
| Field Detail |
public static final int ACCESS_ALLOWED
public static final int ACCESS_BLOCKED_BY_IT_POLICY
public static final int ACCESS_BLOCKED_BY_RIM
public static final int ACCESS_BLOCKED_BY_USER
The application can ask the user to change the setting, and bring him or her to the
application's BBM Options screen by calling requestAppSettings().
public static final int ACCESS_BLOCKED_RESET_REQUIRED
public static final int ACCESS_NO_DATA_COVERAGE
BBMPlatformManager.register(BBMPlatformApplication) again if there is sufficient coverage.public static final int ACCESS_REGISTER_WITH_UI_APPLICATION
public static final int ACCESS_REREGISTRATION_REQUIRED
BBMPlatformManager.register(BBMPlatformApplication).
All references obtained through the API are no longer
valid and need to be re-acquired. Call BBMPlatformManager.register(BBMPlatformApplication application)
to obtain a new BBMPlatformContext and subsequently new references for
MessagingService, UIService, ContactListService, UserProfile, etc.public static final int ACCESS_TEMPORARY_ERROR
BBMPlatformManager.register(BBMPlatformApplication) in 30 minutes or
the next time the application starts.public static final int APP_ENVIRONMENT_APPWORLD
public static final int APP_ENVIRONMENT_TEST
public static final int BBM_SDK_VER_1_0
Presence.getBBMSDKVersion()public static final int BBM_SDK_VER_1_2
Presence.getBBMSDKVersion()public static final int BBM_SDK_VER_1_3
Presence.getBBMSDKVersion()public static final int INVOKE_CHAT_MESSAGE
A TPA link appears in a chat message (bubble) when the user starts a chat from the
application, using UIService.startBBMChat(java.lang.String).
Used in BBMPlatformContextListener.appInvoked(int, Object, Presence), where:
param is null.
user is the user whose chat message TPA link was clicked.
BBMPlatformContextListener.appInvoked(int, Object, Presence),
UIService.startBBMChat(java.lang.String)public static final int INVOKE_PERSONAL_MESSAGE
A TPA link appears in a user's personal message when set by UserProfile.setPersonalMessage(java.lang.String).
Used in BBMPlatformContextListener.appInvoked(int, Object, Presence), where:
param is the personal message String, excluding the TPA link.
user is the user whose personal message TPA link was clicked.
BBMPlatformContextListener.appInvoked(int, Object, Presence),
UserProfile.setPersonalMessage(String)public static final int INVOKE_PROFILE_BOX
Used in BBMPlatformContextListener.appInvoked(int, Object, Presence), where:
param is null.
user is the user whose profile box was clicked.
BBMPlatformContextListener.appInvoked(int, Object, Presence),
UserProfileBoxpublic static final int INVOKE_PROFILE_BOX_ITEM
Used in BBMPlatformContextListener.appInvoked(int, Object, Presence), where:
param is the UserProfileBoxItem that was clicked.
user is the user whose profile box item was clicked.
BBMPlatformContextListener.appInvoked(int, Object, Presence),
UserProfileBoxpublic static final int SETTING_SHARECONTENT_SPLAT
MessagingService#shareContent(String, BBMPlatformData) request is received
while application is not running
This constant can be set by overriding BBMPlatformApplication.getDefaultSettings()
| Method Detail |
public int getAccessErrorCode()
ACCESS_*)
public int getAppEnvironment()
throws ControlledAccessException
APP_ENVIRONMENT_TEST or APP_ENVIRONMENT_APPWORLDControlledAccessException - if the caller does not have access permission to BBM platform.public ContactListService getContactListService() throws ControlledAccessException
ContactListService registered with the BBM platform.ControlledAccessException - if the caller does not have access permission to BBM platform.public MessagingService getMessagingService() throws ControlledAccessException
MessagingService registered with BBM platform.ControlledAccessException - if the caller does not have access permission to BBM platform.public SettingsManager getSettingsManager() throws ControlledAccessException
SettingsManager registered with the BBM platform.ControlledAccessException - if the caller does not have access permission to BBM platform.public UIService getUIService() throws ControlledAccessException
UIService registered with BBM platform.ControlledAccessException - if the caller does not have access permission to BBM platform.public UserProfile getUserProfile() throws ControlledAccessException
ControlledAccessException - if the caller does not have access permission to BBM platform.PersistentContentException - when Content Protection is enabled and device is locked.public boolean isAccessAllowed()
true if the application is authorized to access BBM,
false otherwise.public void removeListener()
BBMPlatformContextListener from BBMPlatformContext.
If a listener has not been added, then this method does nothing.public void requestAppSettings()
getAccessErrorCode() has a value of ACCESS_ALLOWED or
ACCESS_BLOCKED_BY_USER.IllegalStateException - if not called from the event thread of a UiApplicationControlledAccessException - if getAccessErrorCode() is not ACCESS_ALLOWED
or ACCESS_BLOCKED_BY_USER.public void requestBBMToForeground()
public boolean requestUserPermission()
requestAppSettings().
net.rim.device.api.system.Application#invokeAndWait(Runnable).
The method has no effect unless getAccessErrorCode() has a value of ACCESS_BLOCKED_BY_USER.true if the user connected the application to BBM; otherwise, false.
Returns false if getAccessErrorCode() is not ACCESS_BLOCKED_BY_USER.IllegalStateException - if not called from a UiApplicationpublic void setListener(BBMPlatformContextListener listener)
BBMPlatformContextListener for the BBMPlatformContext.
The listener will be notified of all BBMPlatformContext events.listener - The listener to add to the BBMPlatformContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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.