|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.system.ApplicationDescriptor
public final class ApplicationDescriptor
Encapsulates descriptive information for an application.
Application
,
ApplicationManager
Field Summary | ||
---|---|---|
static int |
DO_NOT_POWER_ON
If the device is off, DO NOT power on the device when this application is scheduled to be run. |
|
static byte |
FLAG_AUTO_RESTART
Automatically restart this application if it exits. |
|
static byte |
FLAG_RUN_ON_STARTUP
Run this application on device startup. |
|
static byte |
FLAG_SYSTEM
System application. |
|
static int |
POWER_ON
If the device is off, power on the device when this application is scheduled to be run. |
|
static int |
POWER_ON_ALWAYS
If the device is off, power on the device when this application is scheduled to be run, only if it's in a list of preregistered applications that are to power on. |
|
static int |
POWER_ON_FOR_AUTO_ON
If the device is off, power on the device when this application is scheduled to be run, only if it's in a list of preregistered applications that are to power on. |
Constructor Summary | ||
---|---|---|
ApplicationDescriptor(ApplicationDescriptor original,
String name,
String[] args)
Constructs a new named ApplicationDescriptor, using another descriptor as a template. |
||
ApplicationDescriptor(ApplicationDescriptor original,
String name,
String[] args,
int position,
String nameResourceBundle,
int nameResourceId)
Constructs a new named ApplicationDescriptor, using another descriptor as a template, and providing initial settings. |
||
ApplicationDescriptor(ApplicationDescriptor original,
String name,
String[] args,
int position,
String nameResourceBundle,
int nameResourceId,
int flags)
Constructs a new named ApplicationDescriptor, using another descriptor as a template, and providing initial settings. |
||
ApplicationDescriptor(ApplicationDescriptor original,
String name,
String[] args,
int position,
String nameResourceBundle,
int nameResourceId,
int flags,
String folderName)
Constructs a new named ApplicationDescriptor, using another descriptor as a template, and providing initial settings. |
||
ApplicationDescriptor(ApplicationDescriptor original,
String name,
String[] args,
Bitmap icon,
int position,
String nameResourceBundle,
int nameResourceId)
Deprecated. the caching of icon Bitmaps is no longer supported, use ApplicationDescriptor(ApplicationDescriptor,String,String[],int,String,int) |
||
ApplicationDescriptor(ApplicationDescriptor original,
String name,
String[] args,
Bitmap icon,
int position,
String nameResourceBundle,
int nameResourceId,
int flags)
Deprecated. the caching of icon Bitmaps is no longer supported, use ApplicationDescriptor(ApplicationDescriptor,String,String[],int,String,int,int) |
||
ApplicationDescriptor(ApplicationDescriptor original,
String[] args)
Constructs a new ApplicationDescriptor, using another descriptor as a template. |
Method Summary | ||
---|---|---|
static ApplicationDescriptor |
currentApplicationDescriptor()
Retrieves the descriptor used to start the current process. |
|
boolean |
equals(Object o)
Compares this descriptor to another object for equivalency. |
|
String[] |
getArgs()
Retrieves the argument array from this descriptor. |
|
EncodedImage |
getEncodedIcon()
Retrieves the icon from this descriptor. |
|
int |
getFlags()
Retrieves the flags from this descriptor. |
|
String |
getFolderName()
Returns the application's suggested folder name to place this application in. |
|
Bitmap |
getIcon()
Deprecated. Will be replaced with one returning an EncodedImage. use getEncodedIcon() |
|
int |
getIndex()
Retrieves the application index from this descriptor. |
|
String |
getLocalizedName()
Retrieves the localized name of the application. |
|
int |
getModuleHandle()
Retrieves handle for this descriptor's code module. |
|
String |
getModuleName()
Retrieves name of this descriptor's code module. |
|
String |
getName()
Retrieves the application name from this descriptor. |
|
String |
getNameResourceBundle()
Retrieves the resource bundle from this descriptor. |
|
int |
getNameResourceId()
Retrieves the resource ID from this descriptor. |
|
int |
getPosition()
Returns the application's suggested position on the home screen. |
|
int |
getPowerOnBehavior()
Retrieves the application's "power on" behavior. |
|
String |
getVersion()
Retrieves the version string from this descriptor. |
|
void |
setPowerOnBehavior(int behavior)
Sets the application's "power on" behavior. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DO_NOT_POWER_ON
public static final int POWER_ON
public static final int POWER_ON_FOR_AUTO_ON
public static final int POWER_ON_ALWAYS
public static final byte FLAG_RUN_ON_STARTUP
public static final byte FLAG_SYSTEM
public static final byte FLAG_AUTO_RESTART
Constructor Detail |
---|
public ApplicationDescriptor(ApplicationDescriptor original, String[] args)
Note that this builds a new application descriptor but does not provide it with a name.
original
- Application descriptor template from which to build this
new one.args
- Initial arguments for this new descriptor.public ApplicationDescriptor(ApplicationDescriptor original, String name, String[] args)
original
- Application descriptor template from which to build this
new one.name
- Name for this new descriptor.args
- Initial arguments for this new descriptor.public ApplicationDescriptor(ApplicationDescriptor original, String name, String[] args, Bitmap icon, int position, String nameResourceBundle, int nameResourceId)
original
- Application descriptor template from which to build this
new one.name
- Name for this new descriptorargs
- Initial arguments for this new descriptor.icon
- Display icon for this new descriptor.position
- Home screen position for this new descriptor's icon.nameResourceBundle
- Resource bundle containing localized version of
this descriptor's name.nameResourceId
- Resource ID containing localized version of this
descriptor's name.public ApplicationDescriptor(ApplicationDescriptor original, String name, String[] args, Bitmap icon, int position, String nameResourceBundle, int nameResourceId, int flags)
original
- Application descriptor template from which to build this
new one.name
- Name for this new descriptorargs
- Initial arguments for this new descriptor.icon
- Display icon for this new descriptor.position
- Home screen position for this new descriptor's icon.nameResourceBundle
- Resource bundle containing localized version of
this descriptor's name.nameResourceId
- Resource ID containing localized version of this
descriptor's name.flags
- Application flags for this new descriptor.public ApplicationDescriptor(ApplicationDescriptor original, String name, String[] args, int position, String nameResourceBundle, int nameResourceId)
original
- Application descriptor template from which to build this
new one.name
- Name for this new descriptorargs
- Initial arguments for this new descriptor.position
- Home screen position for this new descriptor's icon.nameResourceBundle
- Resource bundle containing localized version of
this descriptor's name.nameResourceId
- Resource ID containing localized version of this
descriptor's name.public ApplicationDescriptor(ApplicationDescriptor original, String name, String[] args, int position, String nameResourceBundle, int nameResourceId, int flags)
original
- Application descriptor template from which to build this
new one.name
- Name for this new descriptorargs
- Initial arguments for this new descriptor.position
- Home screen position for this new descriptor's icon.nameResourceBundle
- Resource bundle containing localized version of
this descriptor's name.nameResourceId
- Resource ID containing localized version of this
descriptor's name.flags
- Application flags for this new descriptor.public ApplicationDescriptor(ApplicationDescriptor original, String name, String[] args, int position, String nameResourceBundle, int nameResourceId, int flags, String folderName)
original
- Application descriptor template from which to build this
new one.name
- Name for this new descriptorargs
- Initial arguments for this new descriptor.position
- Home screen position for this new descriptor's icon.nameResourceBundle
- Resource bundle containing localized version of
this descriptor's name.nameResourceId
- Resource ID containing localized version of this
descriptor's name.flags
- Application flags for this new descriptor.folderName
- The suggested folder location for this new descriptor's icon.Method Detail |
---|
public int getModuleHandle()
public String getModuleName()
public String getName()
public int getIndex()
public String getNameResourceBundle()
public int getNameResourceId()
public String[] getArgs()
public String getLocalizedName()
public String getVersion()
public int getFlags()
public Bitmap getIcon()
Bitmap
.public EncodedImage getEncodedIcon()
EncodedImage
.public int getPosition()
Applications with identical positions are placed on a first-come, first-serve basis. A lower value of position means that the application is placed closer to the start of the home screen, normally the top-left.
public String getFolderName()
public boolean equals(Object o)
Equivalency is ensured if your object is an application descriptor, has the same module handle, and has the same list of arguments.
equals
in class Object
o
- Object to compare to this descriptor.
Boolean.hashCode()
,
Hashtable
public static ApplicationDescriptor currentApplicationDescriptor()
public void setPowerOnBehavior(int behavior)
ApplicationDescriptor.DO_NOT_POWER_ON
.
behavior
- The application's new "power on" behavior (one of the POWER_ON
behavior flags).ApplicationDescriptor.DO_NOT_POWER_ON
,
ApplicationDescriptor.POWER_ON
,
ApplicationDescriptor.POWER_ON_FOR_AUTO_ON
,
ApplicationDescriptor.POWER_ON_ALWAYS
public int getPowerOnBehavior()
POWER_ON
behavior flags).ApplicationDescriptor.DO_NOT_POWER_ON
,
ApplicationDescriptor.POWER_ON
,
ApplicationDescriptor.POWER_ON_FOR_AUTO_ON
,
ApplicationDescriptor.POWER_ON_ALWAYS
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.