make SampleVoiceAssistInputService -j64
adb install $OUT/target/product/emulator_car_x86/system/app/SampleVoiceAssistInputService/SampleVoiceAssistInputService.apk
adb shell am start-foreground-service com.android.car.voiceassistinput.sample/.SampleVoiceAssistInputService
Steps to run unit tests:
atest SampleVoiceAssistInputServiceTest
This is a test script to demonstrate how VoiceAssistInputEvent can be used to implement OEM partners non-standard handling of the voice assist key.
Note: Make sure SampleVoiceAssistInputService is installed and started. Especially if you've just ran tests. Depending on the configuration you use, running SampleVoiceAssistInputServiceTest may uninstall SampleVoiceAssistInputService.
For this example, press home first, then inject the event to start Assistant activity:
adb shell cmd car_service inject-key 231