Page 1012 - 3-2
P. 1012
public void clickClose(View v) {
finish();
}
}
< BluetoothService.java >
package kr.icehs.intec.automaticvaluablesbox_0515;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Intent;
import android.os.Handler;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.UUID;
/**
* Created by user on 2017-05-21.
*/
public class BluetoothService {
//Debugging
private static final String TAG = "BluetoothService";
// Intent request code
private static final int REQUEST_CONNECT_DEVICE = 1;
private static final int REQUEST_ENABLE_BT = 2;
private int mState;
public static final int STATE_NONE = 0; // we're doing nothing
public static final int STATE_LISTEN = 1; // now listening for incoming connections
public static final int STATE_CONNECTING = 2; // now initiating an outgoing connection
public static final int STATE_CONNECTED = 3; // now connected to a remote device
public static final int STATE_FAIL = 7;
private Activity mActivity;
private Handler mHandler;
// RFCOMM Protocol
- 1012 -