tree: e43e17b8adeb97f9e3c634442d1a66d003497db4 [path history] [tgz]
  1. res/
  2. src/
  3. tests/
  4. Android.bp
  5. AndroidManifest.xml
  6. readme.md
tests/SampleVoiceAssistInputService/readme.md

Custom Input Event

Building

make SampleVoiceAssistInputService -j64

Installing

adb install $OUT/target/product/emulator_car_x86/system/app/SampleVoiceAssistInputService/SampleVoiceAssistInputService.apk

Start SampleVoiceAssistInputService

adb shell am start-foreground-service com.android.car.voiceassistinput.sample/.SampleVoiceAssistInputService

Running tests

Steps to run unit tests:

  1. Build and install SampleVoiceAssistInputService.apk (see above sections).
  2. Then run:
atest SampleVoiceAssistInputServiceTest

Inject events (test script)

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.

Inject Voice Assist event from push to talk button

For this example, press home first, then inject the event to start Assistant activity:

adb shell cmd car_service inject-key 231