25. Changing Orientation
Some device configurations can change during runtime (such as screen
orientation, keyboard availability, and language). When such a change occurs,
Android restarts the running Activity (onDestroy() is called, followed by
onCreate()).
26. Changing Orientation
The restart behavior is designed to help your application adapt to new
configurations by automatically reloading your application with alternative
resources that match the new device configuration.
56. Receiving Voice Input in a
Notification
// Key for the string that's delivered in the action's intent
private static final String EXTRA_VOICE_REPLY = "extra_voice_reply";
String replyLabel = getResources().getString(R.string.reply_label);
RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY)
.setLabel(replyLabel)
.build();