Media Controller
Tizen provides a functionality for you to communicate between the media controller server and client.
The Media Controller API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices. All mandatory APIs are supported on the Tizen Emulators.
To manage the media using the Media Controller API, you have to develop 2 applications:
- Client that sends requests to the server in order to change, for example, the playback state and position modes.
- Server that directly manages the media on the device.
The main features of the Media Controller API include:
- Setting up the client and server pair
You can set up the client and server pair by creating a new server using the createServer() method. On the client side, you can get a client and find active servers using the getClient() and findServers() methods.
- Managing requests
You can send a request from the client to the server to modify various playback attributes. In the server, you can set up a listener to react to the client request and perform the requested task.
- Receiving notifications from the server
You can receive notifications on changed made by the server by registering a listener with the addPlaybackInfoChangeListener() method.
- Sending custom commands
You can use the client to send commands with the sendCommand() method.
To receive and handle incoming commands in the server, use the addCommandListener() method.