An application can restart mm-detect with an explicit command if mm-detect
has unexpectedly stopped and if the application can't proceed without automated media detection and synchronization.
The exact conditions that require an application to restart mm-detect are:
- the mm-detect process has terminated abnormally
- the client is required, by design or user request, to ensure that all its media information is
up to date before refreshing its display
- the car infotainment system can't be rebooted to restart mm-detect with SLM
because doing so would be too disruptive to the user
To restart mm-detect manually, your application must:
-
Confirm that mm-detect isn't already running by
checking the list of active processes with the pidin or ps command.
-
Confirm that both the qdb and mm-sync processes are already running by
checking the same list of active processes.
The mm-detect process depends on both these other services, so if either one is not running,
that service must be started; otherwise, mm-detect won't do anything when it runs.
-
Send the command line for running mm-detect with the desired command options
to the OS, using the system() or spawn() system call.
For details on the system calls that send commands to the OS, see the C Library Reference.
For the full list of command-line options, see the mm-detect command line section.
The OS tries to run mm-detect and reports the operation outcome to sloginfo.
If sloginfo shows no error, mm-detect is now running.
Note:
Your system should run only one instance of mm-detect, so applications relying
on the service must coordinate with each other to avoid starting mm-detect multiple times.