8. Getting follow-up user input
• Music App
• “play some music”
• “what genre?”
• Home Automation App
• “OK Google, turn on the lights”
• “which room?”
• Verifying that an activity should complete
• “Are you sure?”
9. Voice Interactions
VoiceInteractor
used for response prompting and confirmation
<activity android:name=“com.demoapps.activities.DemoVoice”>
<intent-filter>
<action android:name=“com.demoapps.DEMO_ACTION_INTENT” />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.VOICE" />
</intent-filter>
</activity>
10. Voice Interactions
class DemoVoice extends Activity {
@Override
public void onResume() {
if (isVoiceInteraction()) {
// do our voice stuff here
}
finish();
}
}
11. Voice Interactions
class VoiceConfirm extends
VoiceInteraction.ConfirmationRequest {
public VoiceConfirm(String prompt) {
super(prompt, null);
}
@Override
public void onConfirmationResult(
boolean confirmed, Bundle null) {
if (confirmed) {
// do voice stuff
}
finish();
}
};
class DemoVoice extends Activity {
@Override
public void onResume() {
if (isVoiceInteraction()) {
getVoiceInteractor().
sendRequest(new
VoiceConfirm(userPromptString));
} else {
finish();
}
}
}
13. “Google's 'Now on Tap' is Android's next killer feature” (CNET)
“Google Now on Tap is the coolest Android feature” (ANDROIDPIT)
“The next evolution of the digital concierge” (Tech Republic)
14.
15.
16.
17. • Scans your screen only when you press and hold
the Home button
• Fully opt-in feature
• Work out of the box with any app
27. Icons in Notifications
Presented in Google IO 2015
Notification myNotification = new Notification.Builder(context)
.setSmallIcon(noti_icon).build();
Icon noti_icon = Icon.createWithResource(context,
R.drawable.app_ic_notification);
28. Icons in Notifications
Presented in Google IO 2015
Notification myNotification = new Notification.Builder(context)
.setSmallIcon(noti_icon).build();
Icon noti_icon = Icon.createWithResource(context,
R.drawable.app_ic_notification);
Icon noti_icon = Icon.createWithBitmap(myIconBitmap);
29. Icons in Notifications
Presented in Google IO 2015
Notification myNotification = new Notification.Builder(context)
.setSmallIcon(noti_icon).build();
Icon noti_icon = Icon.createWithResource(context,
R.drawable.app_ic_notification);
Icon noti_icon = Icon.createWithBitmap(myIconBitmap);
72°