Create resources for use in your application

This step explains how to create resources for use in your application.

  1. 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:
  2. <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>
    
  3. 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:
  4. <TextView
      android:id="@+id/connection_status_text"
      android:text="@string/wva_connect_unknown"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" />
    
  5. Next, Add code to connect to the WVA.

 

© 2017 Digi International Inc. All rights reserved.
Create resources for use in your application updated on 03 Jan 2019 01:18 PM