This project demonstrates methods of enabling/disabling voice commands feature and reloading a voice command list depending on the activity you extend.
This sample does not require any additional setup. Open the project in Android Studio, connect your device, and press Play to launch the app!