C
QDynamicAudioRouting Class
Controls audio routing on Android Automotive devices. More...
Header: | #include <QDynamicAudioRouting> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS AndroidAutomotiveMedia) target_link_libraries(mytarget PRIVATE Qt6::AndroidAutomotiveMedia) |
Since: | QtAndroidAutomotive 6.5 |
In QML: | DynamicAudioRouting |
Inherits: | QObject |
Public Functions
QVector<int> | audioZoneIds() const |
bool | clearZoneIdForUid(int uid) const |
bool | isDynamicRoutingEnabled() const |
bool | isValid() const |
bool | setZoneIdForUid(int zoneId, int uid) const |
int | zoneIdForUid(int uid) const |
Static Public Members
QDynamicAudioRouting * | instance() |
Detailed Description
Controls audio routing on Android Automotive devices. Audio Routing feature is described in Audio Routing Guidelines.
Member Function Documentation
QVector<int> QDynamicAudioRouting::audioZoneIds() const
Returns all available audio zones on the device.
[invokable]
bool QDynamicAudioRouting::clearZoneIdForUid(int uid) const
Clears the active audio zone to the default for the given uid. This request can fail if occupant zone mapping is currently active. Returns true
if successful, false
otherwise.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[static]
QDynamicAudioRouting *QDynamicAudioRouting::instance()
Returns a pointer to the singleton instance.
[invokable]
bool QDynamicAudioRouting::isDynamicRoutingEnabled() const
Checks if the system has dynamic routing enabled. Returns true
if feature is enabled, otherwise false
.
For more information, see Enabling AAOS routing.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable]
bool QDynamicAudioRouting::isValid() const
Checks if required internal JNI objects have been correctly loaded. Returns true
if all required internal JNI objects are valid, otherwise false
.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable]
bool QDynamicAudioRouting::setZoneIdForUid(int zoneId, int uid) const
Sets the app associated with the given uid to use the audio zone defined by the given zoneId. This request can fail if occupant zone mapping is currently active. Returns true
if request was successful, false
otherwise.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also zoneIdForUid().
[invokable]
int QDynamicAudioRouting::zoneIdForUid(int uid) const
Returns the zone id currently in use by the given uid, or -1 if the request fails.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also setZoneIdForUid().
Available under certain Qt licenses.
Find out more.