Finished connecting with the robot via Bluetooth

This commit is contained in:
2013-11-22 11:13:08 -04:30
parent 9b84214f8d
commit 99a17242cf
8 changed files with 274 additions and 72 deletions

View File

@@ -2,10 +2,42 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:baselineAligned="false"
tools:context=".MainActivity" >
</RelativeLayout>
<Button
android:id="@+id/connectButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1"
android:layout_centerHorizontal="true"
android:gravity="center"
android:onClick="connectWithRobot"
android:text="@string/robot_pair_button" />
<Button
android:id="@+id/startButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/connectButton"
android:layout_alignRight="@+id/connectButton"
android:layout_below="@+id/connectButton"
android:gravity="center"
android:onClick="startConnections"
android:text="@string/start_button" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="60dp"
android:contentDescription="@string/lens_icon"
android:src="@drawable/camera_lens" />
</RelativeLayout>

View File

@@ -7,7 +7,7 @@
<string name="camera_success">Cámara abierta exitosamente</string>
<string name="camera_failure">La cámara no pudo abrirse</string>
<string name="get_server_button">Conectar con NxtAR</string>
<string name="start_button">Conectar con dispositivo controlador</string>
<string name="start_button">Comenzar streaming de video</string>
<string name="title_activity_cam">CamActivity</string>
<string name="ipAddressLabel">Dirección IP de NxtAR</string>
<string name="badIpToast">La dirección IP no es válida</string>
@@ -17,6 +17,13 @@
<string name="cancel_button">Cancelar</string>
<string name="wifi_on_button">Encender</string>
<string name="wifi_on_success">El radio del WiFi está encendido</string>
<string name="wifi_on_fail">Esta app no puede funcionar sin wifi. Cerrando.</string>
<string name="wifi_on_fail">Esta app no puede funcionar sin wifi, cerrando.</string>
<string name= "bt_no_support">Este dispositivo no soporta Bluetooth</string>
<string name="bt_on_fail">Esta app no puede funcionar sin Bluetooth, cerrando</string>
<string name="lens_icon">Ícono de lente</string>
<string name="robot_pair_button">Conectar con el robot</string>
<string name="robot_choice">Escoja un robot</string>
<string name="conn_established">Conexión exitosa con el robot</string>
<string name="conn_failed">No se pudo conectar con el robot</string>
</resources>

View File

@@ -8,7 +8,7 @@
<string name="camera_failure">Camera could not be opened</string>
<string name="title_activity_cam">CamActivity</string>
<string name="get_server_button">Connect with NxtAR</string>
<string name="start_button">Connect with controller device</string>
<string name="start_button">Start video streaming</string>
<string name="ipAddressLabel">NxtAR IP Address</string>
<string name="badIpToast">Invalid IP address</string>
<string name="emptyIpToast">Fill out the IP address field</string>
@@ -16,7 +16,14 @@
<string name="wifi_on_msg">Turn on the WiFi?</string>
<string name="cancel_button">Cancel</string>
<string name="wifi_on_button">Turn on</string>
<string name="wifi_on_success">The Wifi radio is on now</string>
<string name="wifi_on_fail">This app cannot work without wifi. Closing.</string>
<string name="wifi_on_success">The WiFi radio is on now</string>
<string name="wifi_on_fail">This app cannot work without WiFi, closing</string>
<string name="bt_no_support">This device does not support Bluetooth</string>
<string name="bt_on_fail">This app cannot work without Bluetooth, closing</string>
<string name="lens_icon">Image lens icon</string>
<string name="robot_pair_button">Connect with robot</string>
<string name="robot_choice">Pick a robot</string>
<string name="conn_established">Successfully connected with the robot</string>
<string name="conn_failed">Could not connect with the robot</string>
</resources>
</resources>