Saturday, May 4, 2013

Application Screens

In this section, we explain the di erent screens of the Android app and how to navigate them.


Figure 1 shows the opening screen of the app. This is the first screen that is loaded when the application is launched. This screen gives the user two options . One is to connect to the robot by clicking the START button , or to quit the application by clicking the QUIT button. When the user presses the START button the android application initializes the communication sockets with the robot and establishes a connection with the robot.

Figure 1. Screenshot showing the opening screen of the App


Once the user clicks the start button on the opening screen the application opens the Main Screen of the android application . If the user is able to connect to the robot then it gives the user to start controlling the robot. If the android application isn't able to connect to the robot then a dialog box is shown displaying that the connection to the robot couldn't be established and asks the user to try again, and takes the user back to the Opening Screen.

If the application establishes a connection with the robot and the user presses start on the dialog box, then the application displays the video on the screen and the ping distance on the top of the screen. The slider to determine the speed of the robot is to the right of the screen. When the application loads the main screen for the first time the slider is in the middle to indicate that robot is in not being powered to go forward nor backward. This activity is FULL SCREEN Activity and the main view item of the activity is the video view. The ping distance and the slider have been added on top of the video view using the fragment layouts. Also the PAUSE and the SETTINGS button have been added using the Fragment Layout . The two buttons are displayed when the user taps on any part of the screen other than the slider.

Figure 2. Screenshot showing the main screen of the App

In Figure 2 we can see that the video view (GstreamerSurfaceView) is the main view of the full screen activity and the other components of the screen have been added on top of that view. When the user presses the PAUSE button the application sends a STOP signal to the robot and stops sending/receiving data over the sockets to the robot. The accelerometers also get disabled. A dialog box is displayed giving the user the option either to play again or go back to the opening screen. If the user selects the play button then the video starts streaming again and the inputs from the user are sent to the robot. If the user presses back, the user is taken back to the opening screen and all the connections with the robot are closed immediately. 

When the user presses the SETTINGS button the settings activity is started and the robot is stopped till the user returns from the settings activity. When the user returns from the settings activity the user again has the option to either play or go back to the opening screen. 


The settings screen gives the user option to edit the settings related to application . The first option is to either enable/disable the ping sensor on the android application . The second option is to select the distance at which the robot has to come to halt in front of an obstacle. The user can select from 10 cm, 15 cm, 20 cm, 30 cm and 40 cm. Once the user selects the options and presses back button on the settings screen the application transmits the selections back to the robot immediately. This activity extends a PreferenceActivity and the uses Shared Preferences to store the options of the

No comments:

Post a Comment