smartdevicelink / sdl_requirements

Collection of requirements/technical tasks for new sdl_core features
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

[RC:SetInteriorVehicleData] Setting audio source by application running in BACKGROUND #49

Closed KhrystynaDubovyk closed 6 years ago

KhrystynaDubovyk commented 6 years ago

The proposal New remote control modules (LIGHT, AUDIO, HMI_SETTINGS) and parameters (SIS Data) says:

Applications in HMI level NONE or BACKGROUND are not allowed to change the audio source. Instead, if an application running in BACKGROUND wants to switch the audio source from others to itself, the application shall send an alert with at least "yes" and "no" soft buttons to notify the driver the intention to change the audio source, and set value STEAL_FOCUS (the system shall bring the application to foreground and set audio source to this media application) as the SystemAction of the "yes" soft button, so that the driver can click the soft button to confirm the switch.

@yang1070, please advise on expected behavior for the following use case:

Pre-conditions:
a. media mobile app is registered with REMOTE_CONTROL appHMIType with SDL
b. the application running in BACKGROUND

Steps:

  1. Application requests to switch the audio source from others to itself

Expected:

  1. App sends <Alert>( UI-related params WITH softButtons ‘yes’ ‘no’) to SDL
  2. SDL transfers the request to HMI with requested params displayed on the Alert dialog
  3. User presses Alert softButton STEAL_FOCUS system context
  4. HMI closes Alert dialog
  5. SDL brings the application to foreground (HMI_FULL)

How does the system set the audio source to this media application? Shall the application after turning to FULL HMI level send SetInteriorVehicleData_request to SDL?

yang1070 commented 6 years ago

after step 6. SDL brings the application to foreground (HMI_FULL) if the app is a MEDIA type app, the system shall also set the audio source to the mobile media apps. This should be the same as we launch a media app (even it is not a remote_control app) to FULL, or a background media app get re-focused when driver clicked a steal-focus button, (this already works on SYNC3 platform) In this case there is no need for the app to send a SetInteriorVehicleData_request to SDL.

In addition, I suggest SDL does not block/deny SetInteriorVehicleData request for changing audio source if an app do send such a SetInteriorVehicleData request in background, SDL forward the request to HMI, it is the HMI side's responsibility to deny or allow it (when the app is in background).