Weitere ähnliche Inhalte
Ähnlich wie 20131216 Android App Inventor and LEGO Robot Mindstorms (20)
Mehr von Kenichi Ohwada (20)
Kürzlich hochgeladen (12)
20131216 Android App Inventor and LEGO Robot Mindstorms
- 23. App Inventor vs Java
App Inventor 利点
簡単
Java 利点
細かい制御
2013年12月16日 日本Androidの会 大和田健一
- 24. Java の Bluetooth 制御
BluetoothChatService.java 500行
http://developer.android.com/resources/samples/BluetoothChat/index.html
public class BluetoothChatService {
// Debugging
private static final String TAG = "BluetoothChatService";
private static final boolean D = true;
// Name for the SDP record when creating server socket
private static final String NAME_SECURE = "BluetoothChatSecure";
private static final String NAME_INSECURE = "BluetoothChatInsecure";
// Unique UUID for this application
private static final UUID MY_UUID_SECURE =
UUID.fromString("fa87c0d0-afac-11de-8a39-0800200c9a66");
private static final UUID MY_UUID_INSECURE =
UUID.fromString("8ce255c0-200a-11e0-ac64-0800200c9a66");
// Member fields
private final BluetoothAdapter mAdapter;
private final Handler mHandler;
private AcceptThread mSecureAcceptThread;
private AcceptThread mInsecureAcceptThread;
private ConnectThread mConnectThread;
private ConnectedThread mConnectedThread;
private int mState;
2013年12月16日 日本Androidの会 大和田健一
- 26. App Inventor の Button 制御
ACTION_UP イベントがない
=> 工夫が必要
例: タイマーで停止
2013年12月16日 日本Androidの会 大和田健一