Skip to content

Android Auto: Add search support

Robert Stone requested to merge rhstone/vlc-android:auto-media-search into master

Description

This MR adds support to show search results within Android Auto as described in the Build media apps for cars: Display browsable search results guide. This is a new feature which works in conjunction with the existing voice search capability.

Motivation and Context

Adding search results allows the user to interact with the contents of the media library post-voice-search to load the precise media desired. When the voice search does not yield exactly what the user intended, it is currently impossible to select an alternative. The only option is to repeatedly perform voice searches in an attempt to land on the desired outcome.

How Has This Been Tested?

This has been tested on an Android Auto Headunit, Android Auto for Phones, and with the Android Auto emulator.

Two observed issues: The first is related to sort order of the return results. The album list may show albums in one order, albums under the artist button may be shown in a different order, and play all may place the results in the playback queue in yet another order. The sort issue should be addressed under a future ticket. The second issue is the label "search results" is not internationalizable by VLC.

SCM note: A large chunk of code is relocated in this MR to a separate method. I did not want to modify the code during relocation (except white-space changes), as it makes traceability a challenge. I broke the change into two commits. In the first commit the method contents are simply moved, and in the 2nd commit logic changes are applied.

Screenshots:

Voice search for artist Johnny Cash only loads the first album shown (14 tracks) cash

Clicking search results allows the user to select the artist and perform play all, or a different album. cash_1

Once play all is selected, 102 tracks are placed in the playback queue. cash_2

Appearance on Android Auto for Phones (Voice command: 'Play song Saturday')

Search_Results_0

Search_Results

Search_Results_2

Search_Results_3

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING section of the README document.
Edited by Robert Stone

Merge request reports

Loading