Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Voice Interaction API

Voice Interaction API

Slides used at my talk about Voice Interaction API during GDG HackFair Philippines 2015

Jomar Tigcal

December 20, 2015
Tweet

More Decks by Jomar Tigcal

Other Decks in Technology

Transcript

  1. Jomar Tigcal GDG Philippines Community Manager Android Developer, Trainer, and

    Consultant Have Android (and Android Wear) apps on Google Play Store http://jomar.tigcal.com [email protected] http://google.com/+JomarTigcal @jomartigcal
  2. Voice Interaction API • New in Marshmallow (23+) • Enables

    apps to interact with users via voice • Confirm actions and select from a list of options using user’s voice
  3. Handle Voice Interaction boolean Activity.isVoiceInteraction() Is activity running as part

    of a voice interaction with the user? boolean Activity.isVoiceInteractionRoot() Was activity started directly by a user’s voice action in the Google Search App?
  4. Confirmation Request class Confirm extends VoiceInteractor.ConfirmationRequest { public Confirm(String ttsPrompt,

    String visualPrompt) { VoiceInteractor.Prompt prompt = new VoiceInteractor.Prompt( new String[] {ttsPrompt}, visualPrompt); super(prompt, null); } … };
  5. Thank you! Try the code lab at https://code-labs.io/codelabs/voice-interaction/ Learn more

    at https://developers.google.com/voice-actions/interaction Build something awesome! Provide feedback: talkback.tigcal.com