Create resources for use in your application
This step explains how to create resources for use in your application.
- Create some string resources to report the connection status to your WVA. In the Project View tree, navigate to and open app > src > main > res > values > strings.xml, and add the following string resource tags:
- Create a layout resource to display the text. In the Project View tree, navigate to and open app > src > main > res > layout > activity_wva.xml, remove the existing TextView resource from the layout, and then replace it with the following:
- Next, Add code to connect to the WVA.
<string name="wva_connect_unknown">Waiting to connect.</string> <string name="wva_connect_ok">WVA connection established!</string> <string name="wva_connect_error">Cannot connect to WVA!</string>
<TextView android:id="@+id/connection_status_text" android:text="@string/wva_connect_unknown" android:layout_width="wrap_content" android:layout_height="wrap_content" />