Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
res/values/ | 15-Dec-2024 | - | 25 | 6 | ||
src/com/android/car/voiceassist/sample/ | 15-Dec-2024 | - | 204 | 142 | ||
tests/ | 15-Dec-2024 | - | 133 | 66 | ||
Android.bp | D | 15-Dec-2024 | 2.4 KiB | 92 | 83 | |
AndroidManifest.xml | D | 15-Dec-2024 | 2 KiB | 43 | 17 | |
readme.md | D | 15-Dec-2024 | 1.2 KiB | 45 | 31 |
readme.md
1# Custom Input Event 2 3## Building 4```bash 5make SampleVoiceAssistInputService -j64 6``` 7 8### Installing 9```bash 10adb install $OUT/target/product/emulator_car_x86/system/app/SampleVoiceAssistInputService/SampleVoiceAssistInputService.apk 11``` 12 13## Start SampleVoiceAssistInputService 14```bash 15adb shell am start-foreground-service com.android.car.voiceassistinput.sample/.SampleVoiceAssistInputService 16``` 17 18### Running tests 19 20Steps to run unit tests: 21 221. Build and install SampleVoiceAssistInputService.apk (see above sections). 231. Then run: 24 25```bash 26atest SampleVoiceAssistInputServiceTest 27``` 28 29## Inject events (test script) 30 31This is a test script to demonstrate how VoiceAssistInputEvent can be used to implement OEM 32partners non-standard handling of the voice assist key. 33 34*Note*: Make sure SampleVoiceAssistInputService is installed and started. Especially if you've just 35 ran tests. Depending on the configuration you use, running SampleVoiceAssistInputServiceTest may 36 uninstall SampleVoiceAssistInputService. 37 38### Inject Voice Assist event from push to talk button 39 40For this example, press home first, then inject the event to start Assistant activity: 41 42```shell script 43adb shell cmd car_service inject-key 231 44``` 45