Retrieve information about a BlackBerry Java Application

  1. Import the following classes:
    • net.rim.device.api.system.ApplicationManager
    • net.rim.device.api.system.ApplicationDescriptor
    • java.lang.String
    • net.rim.device.api.system.
  2. To retrieve information about the processes that are running, invoke ApplicationManager.getVisibleApplications().
    ApplicationManager manager = ApplicationManager.getApplicationManager();
    ApplicationDescriptor descriptors[] = manager.getVisibleApplications();
  3. To retrieve descriptions of the objects for the BlackBerry® device applications that are running, invoke ApplicationDescriptor.getName().
    String appname1 = descriptors[0].getName();
  4. To retrieve a description of the current BlackBerry device application, invoke ApplicationDescriptor.currentApplicationDescriptor()
    ApplicationDescriptor descriptor = ApplicationDescriptor.currentApplicationDescriptor();

Index


Was this information helpful? Send us your comments.