In this section, we will be taking a look at how we can use notifications that can allow the user to respond to these by simply using their voice. Since Android wearable devices don't contain a keyboard, a user can swipe on a notification and respond to the action using their voice, or simply by choosing from a list of options presented to them, and tapping on the item right from their Android wearable device.
To receive voice input within a notification, perform the following steps:
MainActivity.javafile from within the Project Navigator window.
onCreate(Bundle savedInstanceState)method and add the following highlighted code:
@Override protected void onCreate(Bundle savedInstanceState) ...