Accessing information about media files stored on a device

The Media Management Service API allows Flash Lite applications to retrieve information about the media files stored in the Media Gallery of a device. You can use the Media Management Service to access information about the following types of media:

  • Music

  • Sounds

  • Images

  • Video

  • Streaming media

Using the Media Management Service, you can create Flash Lite applications, such as a custom photo viewer or audio player, that display or otherwise incorporate media.

Accessing the API and supported methods

To create a service object for the Media Management Service API, use Service.MediaManagement to identify the service provider and IDataSource to identify the supported interface:

var media = new Service("Service.MediaManagement", "IDataSource");

The IDataSource interface provides the following methods:

  • GetList()

    Use the GetList() method to retrieve information from a given service or data source on the device.

  • Cancel()

    Use the Cancel() method to cancel an ongoing asynchronous call. This method is valid for any asynchronous call made through the Media Management Service API.