|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.system.SetupManager
public class SetupManager
A class that manages how an application can determine whether the Setup Wizard is running on the BlackBerry device.
The Setup application displays a mandatory blocking introduction, which does not allow another application to present UI prompts during the startup of a BlackBerry device. An application should ensure that this section of the Setup application is not being displayed before trying to request user input.
Typically, an application that starts when the device starts will want to register for notifications of state changes. This tells the application when the device is no longer blocked by global screens so the application can prompt the user for permissions or other information.
Registering for notifications
You can add a class that is a SetupListener
to receive
notifications using the
SetupManager.getInstance().addListener(SetupListener)
method.
To unregister this listener, you can call
SetupManager.removeListener(SetupListener)
.
Once the SetupManager
becomes aware that the Setup Wizard
has completed, it will call all the registered listeners. The listeners will
then be removed from the queue so that they don't need to be removed
explicitly.
You can query whether the Setup Wizard is complete by calling
SetupManager.getInstance().isSetupWizardDone()
.
Field Summary | ||
---|---|---|
static int |
SETUP_STATE_COMPLETE
Indicates that the Setup Wizard is complete. |
|
static int |
SETUP_STATE_IN_PROGRESS
Indicates that the Setup Wizard is in progress. |
Method Summary | ||
---|---|---|
boolean |
addListener(SetupListener listener,
Application app)
Adds a listener for receiving notifications about state changes of the Setup application. |
|
static SetupManager |
getInstance()
Gets the singleton instance of the SetupManager class. |
|
int |
getSetupState()
Gets the current state of the Setup application. |
|
void |
removeListener(SetupListener listener)
Removes a listener for receiving notifications about state changes of the Setup application. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SETUP_STATE_IN_PROGRESS
public static final int SETUP_STATE_COMPLETE
Method Detail |
---|
public static SetupManager getInstance()
SetupManager
class.
SetupManager
.public int getSetupState()
public boolean addListener(SetupListener listener, Application app)
listener
- The SetupListener
object to call back.app
- The SetupListener
application to call back.
true
if the listener was added, false
if the listener was not added. When returning false
, the
reason could be that the Setup application has already completed. Use
SetupManager.getInstance().getSetupState()
to determine the
state.public void removeListener(SetupListener listener)
listener
- The SetupListener
instance to remove from
the list of listeners.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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