標題:
openBTClick
[打印本頁]
作者:
ray
時間:
2018-9-15 11:45
標題:
openBTClick
if(myBT == null)
{
status.setText("this device not support Bluetooth");
}
if(!myBT.enable())
{
Intent enable = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
this.startActivityForResult(enable,0);
}
Intent scanable = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
this.startActivityForResult(scanable,0x2);
status.setText("Bluetooth open success");
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/)
Powered by Discuz! 7.2