[4.1.0.24] Pure maps / QML Audio element don't play through bluetooth car kit

REPRODUCIBILITY: 100%
BUILD ID = OS VERSION: 4.1.0.24
HARDWARE: XA2
UI LANGUAGE: EN
REGRESSION: Since 4.0

DESCRIPTION:

Even when connected to a bluetooth speaker or car kit, Pure Maps’ spoken navigation is routed to speaker. Pure maps uses QML Audio (source), so apps using the same element might have same issue. I didn’t test that.

PRECONDITIONS:

Pure maps installed (I use open repos version) with spoken navigation configured.

STEPS TO REPRODUCE:

  1. Connect to a bluetooth speaker or car kit.
  2. Start navigation in Pure maps

EXPECTED RESULT:

Instructions are played on car kit

ACTUAL RESULT:

Instructions are played on phone’s speaker.

ADDITIONAL INFORMATION:

Sound of other apps, like Talefish or the default media player, are played on the car kit, so the connection works. The developer, @rinigus, noted the same behavior.

2 Likes

For Audio, Pure Maps is using

    Audio {
        id: sound
        audioRole: Audio.NotificationRole
        autoLoad: true
        loops: 1
    }

Looks like Audio.NotificationRole routing has changed in the releases.

In addition, as found by @karry for OSM Scout, Pure Maps is setting environment variable as in

qputenv("NEMO_RESOURCE_CLASS_OVERRIDE", "navigator");

Corresponding discussion on why the switch was done is documented at Prevent voice navigation stopping other audio · Issue #120 · rinigus/pure-maps · GitHub . This was released with version 2.0.0 of Pure Maps and worked fine with the SFOS available then (31 Oct 2020).

I’ve tried PM with other and no audioRole set, it didn’t seem to matter. I haven’t seen the env variable, so I don’t know its effect.

env variable is in C++ main - so harder to change