android application robot control

18
LOGO www.themegallery.com Android For Robot Application 0010010011101110 1100101010111011

Upload: scottlye

Post on 19-Oct-2015

22 views

Category:

Documents


3 download

TRANSCRIPT

  • LOGOwww.themegallery.com

    Android For Robot Application

    00100100111011101100101010111011

  • LOGOwww.themegallery.com

    Tool Preparation

    Java Runtime Engine JRE http://www.java.com/en/download/manual.jsp

    Eclipse IDE for Java Developershttp://www.eclipse.org/downloads/

    Adroid SDKhttp://developer.android.com/sdk/index.html

    Android Development Tools(ADT) plugin Eclipse

    android - https://dl-ssl.google.com/android/eclipse/

  • LOGOwww.themegallery.com

    Project

    scr (Source code) .java

    gen (Generated Java File) R.java

    res (Resource)

    drawable-hdpi/drawable-ldpi/drawable- mdpi

    Layout View

    Values Application

    AndroidManifest.xml xml Application

  • LOGOwww.themegallery.com

  • LOGOwww.themegallery.com

    Android User Interface

    View

    Widgets TextView,Button,EditText,ImageView

    ViewGroup

    Layout LinearLayout,RelativeLayout

  • LOGOwww.themegallery.com

    Widgets Layout

    id View (Widget) ViewGroup(Layout)

    layout_height View (Widget) ViewGroup(Layout)

    Layout_width View (Widget) ViewGroup(Layout)

    Margin view view Padding view view Gravity view

  • LOGOwww.themegallery.com

    ViewGroup(Layout)

    LinearLayout Layout view

    RelativeLayout Layout view view id

    FrameLayout Layout view

    TableLayout Layout view

    AbsoluteLaout Layout view

  • LOGOwww.themegallery.com

    Example

  • LOGOwww.themegallery.com

    Example

  • LOGOwww.themegallery.com

    Example

  • LOGOwww.themegallery.com

    Example

    AndroidManifest.xml Activity Class

  • LOGOwww.themegallery.com

    Example

    User Interface layout>main.xml

  • LOGOwww.themegallery.com

    Example Activity Class TrainningButton.java src>com.ezybot.trainingbutton

  • LOGOwww.themegallery.com

    Example

  • LOGOwww.themegallery.com

    Workshop Bluetooth

    UUID 00001101-0000-1000-8000-00805F9B34FB

    sendMessage(message);

  • LOGOwww.themegallery.com

    Workshop Accelerometer

    Global variableprivate SensorManager sensorManager;private Sensor sensor;private float x, y, z;private int _fag=1;

    onCreatesensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);sensor = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER).get(0);

    onResumesensorManager.registerListener(accelerationListener, sensor,

    SensorManager.SENSOR_DELAY_GAME);

  • LOGOwww.themegallery.com

    Workshop Accelerometer

  • LOGOwww.themegallery.com