|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.system.ApplicationManager
Manages all Java applications on the device.
Application,
ApplicationDescriptor| Method Summary | ||
|
static ApplicationManager |
getApplicationManager()
Retrieves the system's application manager. |
|
abstract int |
getForegroundProcessId()
Retrieves the process ID of the foreground process. |
|
abstract long |
getNextAlarm(int powerOnBehavior)
Get the next alarm based on the power on behavior |
|
abstract int |
getProcessId(ApplicationDescriptor descriptor)
Retrieves the process ID for specified descriptor's application. |
|
abstract ApplicationDescriptor[] |
getVisibleApplications()
Retrieves descriptors for the visible, running applications. |
|
abstract boolean |
inStartup()
Determines if the device is in the process of starting up. |
|
abstract boolean |
isConsoleDescriptor(ApplicationDescriptor descriptor)
Determines if an application descriptor is the descriptor of the console process. |
|
abstract boolean |
isSystemLocked()
Determines if the system is currently locked. |
|
abstract void |
launch(String url)
Launches an application with provided URL parameter. |
|
abstract void |
lockSystem(boolean force)
Locks the system. |
|
abstract boolean |
postGlobalEvent(int processId,
long guid,
int data0,
int data1,
Object object0,
Object object1)
Posts a global event with additional data and attachments to the specified process. |
|
boolean |
postGlobalEvent(long guid)
Posts a global event to all applications in the system. |
|
boolean |
postGlobalEvent(long guid,
int data0,
int data1)
Posts a global event with additional data to all applications in the system. |
|
abstract boolean |
postGlobalEvent(long guid,
int data0,
int data1,
Object object0,
Object object1)
Posts a global event with additional data and attachments to all applications in the system. |
|
abstract void |
requestForeground(int processId)
Sends a foreground request to application with specified process ID. |
|
abstract void |
requestForegroundForConsole()
Requests that the console process (usually the ribbon) be notified that it should bring itself to the foreground. |
|
int |
runApplication(ApplicationDescriptor descriptor)
Creates a new process to run an application and ask it to foreground itself. |
|
abstract int |
runApplication(ApplicationDescriptor descriptor,
boolean grabForeground)
Creates a new process to run an application. |
|
abstract boolean |
scheduleApplication(ApplicationDescriptor descriptor,
long time,
boolean absolute)
Schedules an application to run at a specific time. |
|
abstract void |
setCurrentPowerOnBehavior(int powerOnBehavior)
Set the Power On Behavior for scheduled applications |
|
abstract boolean |
setInHolsterInputProcess()
Sets the invoking process to receive input events when the device is in the holster. |
|
abstract void |
unlockSystem()
Unlocks the system. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final ApplicationManager getApplicationManager()
public abstract int getForegroundProcessId()
processId - Process ID of the application which is currently in the foreground;
-1 if there is no foreground application.public abstract long getNextAlarm(int powerOnBehavior)
powerOnBehavior - the ApplicationDescriptor power On Behaviour filter alarms by.public abstract int getProcessId(ApplicationDescriptor descriptor)
descriptor - Descriptor for the application in question.public abstract ApplicationDescriptor[] getVisibleApplications()
public abstract boolean inStartup()
public abstract boolean isConsoleDescriptor(ApplicationDescriptor descriptor)
descriptor - The descriptor to check.true if the specified descriptor matches the console process' descriptor;
returns false otherwise or if descriptor==null.public abstract boolean isSystemLocked()
public abstract void launch(String url) throws ApplicationManagerException
This method launches an application with an URL of the following
form:
module.name?param¶m¶m...
or
module?param¶m¶m...
if there is only a single entry point in the module.
url - URL which can be in any form and is passed in the arguments to
main.ApplicationManagerException - If the application could not be run.public abstract void lockSystem(boolean force)
force - If true, force the system to be locked even if security is
disabled. This is used when the IT Policy changes.
public abstract boolean postGlobalEvent(int processId,
long guid,
int data0,
int data1,
Object object0,
Object object1)
To receive and handle such events, the application must register a
GlobalEventListener.
processId - Process ID of the application to receive the event.guid - The GUID of the event.data0 - Additional information associated with the event.data1 - Additional information associated with the event.object0 - Additional information associated with the event.object1 - Additional information associated with the event.public final boolean postGlobalEvent(long guid)
To receive and handle such events, an application must register a
GlobalEventListener.
guid - The GUID of the event.
public final boolean postGlobalEvent(long guid,
int data0,
int data1)
To receive and handle such events, an application must register a
GlobalEventListener.
guid - The GUID of the event.data0 - Additional information associated with the event.data1 - Additional information associated with the event.
public abstract boolean postGlobalEvent(long guid,
int data0,
int data1,
Object object0,
Object object1)
To receive and handle such events, an application must register a
GlobalEventListener.
guid - The GUID of the event.data0 - Additional information associated with the event.data1 - Additional information associated with the event.object0 - Additional information associated with the event.object1 - Additional information associated with the event.public abstract void requestForeground(int processId)
processId - Process ID for the application to receive a foreground request.public abstract void requestForegroundForConsole()
public final int runApplication(ApplicationDescriptor descriptor) throws ApplicationManagerException
Invoke this method to create a new process and invoke the exported
main() method in the specified descriptor. This method then asks the
process to foreground itself (which it may or may not do). If a process
has already been created for your descriptor, then this method sends that
process a foreground request.
descriptor - Descriptor of application to start.ApplicationManagerException - Thrown if the application could not be run.public abstract int runApplication(ApplicationDescriptor descriptor, boolean grabForeground) throws ApplicationManagerException
Invoke this method to create a new process and invoke the exported
main() method in the specified descriptor. If you pass true for the
grabForeground parameter, then this method also asks the process to
foreground itself (which it may or may not do). If a process has already
been created for your descriptor, and you pass true for the
grabForeground parameter, then this method sends that process a
foreground request.
descriptor - Descriptor of application to start.grabForeground - If true, this method prompts the application to
foreground itself.ApplicationManagerException - Thrown if the application could not be run.public abstract boolean scheduleApplication(ApplicationDescriptor descriptor, long time, boolean absolute)
If the application is already scheduled to run at a particular time, then this method updates the schedule with your specified time. Note that the application scheduler has a resolution of one minute. Times are rounded down to the nearest minute.
If the specified time is absolute and has already occurred, the application will not be scheduled.
descriptor - Descriptor of application to start.time - Time at which to run the application; if a negative value,
remove this application from the schedule.absolute - If true, then the time parameter represents the number of
milliseconds since device's origin time (midnight, January 1, 1970 UTC);
otherwise, it represents the number of milliseconds since midnight local time.public abstract void setCurrentPowerOnBehavior(int powerOnBehavior)
powerOnBehavior - the ApplicationDescriptor power On Behaviour to use.public abstract boolean setInHolsterInputProcess()
public abstract void unlockSystem()
Calling this method blocks until the system actually unlocks.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 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.