Package com.unitech.api.bluetooth
Class BluetoothCtrl
- java.lang.Object
-
- com.unitech.api.bluetooth.BluetoothCtrl
-
public class BluetoothCtrl extends java.lang.ObjectThis controller is used to get the bluetooth information.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_ERROR_CODEstatic java.lang.StringBUNDLE_ERROR_MSGstatic intRESULT_CODE_ERRORstatic intRESULT_CODE_SUCCESSstatic java.lang.StringRESULT_KEY_BT_MAC
-
Constructor Summary
Constructors Constructor Description BluetoothCtrl(android.content.Context context)Instantiates a new Bluetooth ctrl.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BluetoothCtrlgetInstance(android.content.Context context)Gets instance.android.os.BundlegetMacAddress()Get mac address bundle.
-
-
-
Field Detail
-
BUNDLE_ERROR_CODE
public static final java.lang.String BUNDLE_ERROR_CODE
- See Also:
- Constant Field Values
-
BUNDLE_ERROR_MSG
public static final java.lang.String BUNDLE_ERROR_MSG
- See Also:
- Constant Field Values
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR
- See Also:
- Constant Field Values
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS
- See Also:
- Constant Field Values
-
RESULT_KEY_BT_MAC
public static final java.lang.String RESULT_KEY_BT_MAC
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static BluetoothCtrl getInstance(android.content.Context context)
Gets instance.- Parameters:
context- the context- Returns:
- the instance
-
getMacAddress
public android.os.Bundle getMacAddress()
Get mac address bundle.- Returns:
- A bundle contains the error code and message
int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
String macAddress = bundle.getString("BluetoothMacAddress");
-
-