GetList()

Description:

The GetList method retrieves an iterable list of either user-installed applications or all applications on the mobile device, regardless of whether they were preinstalled or installed by the user.

This is a synchronous method.

Syntax:

GetList(parameters:Object):Object

Arguments:

Return value:

The GetList method returns an object that contains the requested application information, an error code, and an error message

Table: Return value properties for GetList

Property

Description

Value

ReturnValue

This is an iterator that contains the requested application information.

See Returned application information.

ErrorCode

This is a number that specifies a predefined error code.

See Service API error codes.

ErrorMessage

This is a text string that describes the error.

Example code:

The following sample code illustrates how to retrieve details of the specified text file from its current location:

import com.nokia.lib.Service;
var appManager = new Service("Service.AppManager", "IAppManager");
var filter = {DocumentPath:"c:\\sample.txt"};
var inParams = {Type:"Application", Filter:filter};
var outParams = appManager.GetList(inParams);
var outList = outParams.ReturnValue;
var outputEntry = null;
do {
  outputEntry = outList.next();
  if (null != outputEntry) {
    var caption = outputEntry.Caption;//caption

  } else {
    break;
  }
} while (true);