Best code examples for Android BluetoothDevice class (android.bluetooth.BluetoothDevice)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android BluetoothDevice class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android BluetoothDevice examples from Open Source projects
This code example shows how to use the following methods: getAddress, getName, getAlias
28:	mAddress = device.getAddress(); 
29:	if (device.getAlias() != null) { 
30:	setTitle(device.getAlias()); 
-
32:	setTitle(device.getName()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
80:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
81:	BluetoothListDevicesActivity.this.mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord, getAddress, getName
263:	tmp = mmDevice.createRfcommSocketToServiceRecord(BT_UUID); 
-
277:	+ mmDevice.getName() + " at address " + mmDevice.getAddress()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
395:	tmp = device.createRfcommSocketToServiceRecord(MY_UUID_SECURE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord
350:	tmp = device.createRfcommSocketToServiceRecord(UUID_SPP); 
-
352:	tmp = device.createInsecureRfcommSocketToServiceRecord(MY_UUID_INSECURE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getName
208:	bluetoothNeighbors.add(device.getName() + ";" + device.getAddress()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord
350:	tmp = device.createRfcommSocketToServiceRecord(UUID_SPP); 
-
352:	tmp = device.createInsecureRfcommSocketToServiceRecord(MY_UUID_INSECURE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: equals
142:	return !deviceList.isEmpty() && deviceList.get(0).equals(device) 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getName
14:	super(device.getAddress(), device.getName()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord
53:	mmSocket = device.createInsecureRfcommSocketToServiceRecord(mmServiceUuid); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName, getClass
45:	Log.i("ConnectThread 44", "connecting to " + mmDevice.getName()); 
-
48:	Log.i("ConnectThread 47", "finished connecting to " + mmDevice.getName()); 
-
51:	Method m = mmDevice.getClass().getMethod("createInsecureRfcommSocket", new Class[] {int.class}); 
-
69:	service.connectedThread(this.toString(), mmSocket, mmDevice); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
54:	tmp = bluetoothDevice.createRfcommSocketToServiceRecord(SPP_UUID); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
92:	socket = device.createRfcommSocketToServiceRecord( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord, getAddress, getName
209:	states.putString(BluetoothRunnable.KEY_DEVICE_ADDRESS, mConnectedDevice.getAddress()); 
210:	states.putString(BluetoothRunnable.KEY_DEVICE_NAME, mConnectedDevice.getName()); 
-
274:	tempSocket = mConnectedDevice.createInsecureRfcommSocketToServiceRecord(mUUID); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getBluetoothClass, getBondState, getName
135:	boolean isPaired = device.getBondState() == BluetoothDevice.BOND_BONDED; 
136:	boolean isAudio = device.getBluetoothClass().hasService(BluetoothClass.Service.AUDIO); 
-
138:	BluetoothRow row = new BluetoothRow(device.getName(), 
139:	device.getAddress(), isPaired, isAudio); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
78:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) 
-
80:	tvDevices.append(device.getName() + "��" 
81:	+ device.getAddress() + "\n"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
29:	String deviceName = device.getName(); 
30:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
31:	String address = device.getAddress(); 
-
44:	String address = device.getAddress(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord, getAddress, getName
302:	mSocket = mDevice.createRfcommSocketToServiceRecord(uuidSpp); 
-
313:	Log.i(TAG, "Connected to device " + mDevice.getName() + " [" 
314:	+ mDevice.getAddress() + "]"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress
86:	super.onDeviceConnected(device); 
-
90:	mSigService.registerForNotification(device); 
91:	mBluezService.registerForNotification(device); 
-
95:	intent.putExtra(EXTRA_DEVICE, device.getAddress()); 
-
98:	refresh(device); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getName
31:	this(device.getName(), device.getAddress()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
31:	tmp = device.createRfcommSocketToServiceRecord(UUID.fromString("00001101-0000-1000-8000-00805F9B34FB")); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName, getClass
27:	public TextView devicesFound; 
-
76:	if(bondedDevices.contains(device)){ 
-
78:	intent.putExtra("deviceName", device.getName()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord
40:	.createInsecureRfcommSocketToServiceRecord(MY_UUID_INSECURE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
162:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) 
-
164:	bluetoothDevices.add(device.getName() + ":" 
165:	+ device.getAddress() + "\n"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getName
43:	}, String.format("Reader [%s, %s]", device.getName(), device.getAddress())); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord, getName
63:	Log.d(TAG, "Device name: " + device.getName()); 
-
65:	btSocket = device.createRfcommSocketToServiceRecord(MY_UUID); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
89:	Log.i(TAG, String.format("%s (%s) is found.", device.getName(), device.getAddress())); 
90:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
91:	deviceSet.add(device); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord
372:	tmp = device.createRfcommSocketToServiceRecord(mUuid); 
-
374:	tmp = device.createInsecureRfcommSocketToServiceRecord(mUuid); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
241:	tmp = device.createRfcommSocketToServiceRecord(MY_UUID); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getBondState
25:	Log.d("Bond state", "BOND_STATED = " + device.getBondState()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord
45:	tmp = device.createRfcommSocketToServiceRecord( 
-
48:	tmp = device.createInsecureRfcommSocketToServiceRecord( 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
191:	tmp = device.createRfcommSocketToServiceRecord(MY_UUID); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
383:	Log.i("BluetoothPlugin","Device found "+device.getName()+ " "+device.getBondState()+" " + device.getAddress()); 
-
385:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
-
387:	addDevice(device); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
170:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
171:	mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getName
54:	mMainTextView.append("Discovered Device: " + device.getName() + " (" + device.getAddress() + ")\n"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getName
55:	name_ = device.getName(); 
56:	address_ = device.getAddress(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
189:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
190:	mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
119:	return mDevice.createRfcommSocketToServiceRecord(uuid); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
70:	this.sock = device.createRfcommSocketToServiceRecord(REMUCO_UUID); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
23:	if (bluetoothDevice.getBondState() != BluetoothDevice.BOND_BONDED) 
-
25:	this.logger.d("Device founded: " + bluetoothDevice.getName() + ", address: [" + bluetoothDevice.getAddress() + "]"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord
339:	tmp = device.createRfcommSocketToServiceRecord( 
-
342:	tmp = device.createInsecureRfcommSocketToServiceRecord( 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
117:	socket = device.createRfcommSocketToServiceRecord(MY_UUID); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createInsecureRfcommSocketToServiceRecord, createRfcommSocketToServiceRecord
339:	tmp = device.createRfcommSocketToServiceRecord( 
-
342:	tmp = device.createInsecureRfcommSocketToServiceRecord( 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAddress, getBondState, getName
78:	if (device.getBondState() != BluetoothDevice.BOND_BONDED) 
-
80:	tvDevices.append(device.getName() + "£º" 
81:	+ device.getAddress() + "\n"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
25:	clientSocket = device.createRfcommSocketToServiceRecord(uuid); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
42:	this(pBluetoothDevice.createRfcommSocketToServiceRecord(UUID.fromString(pUUID))); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
58:	socket = nxt.createRfcommSocketToServiceRecord(UUID 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
84:	return device.createRfcommSocketToServiceRecord(SPP_SERIAL); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: createRfcommSocketToServiceRecord
363:	tmp = device.createRfcommSocketToServiceRecord( 
-
366:	tmp = device.createRfcommSocketToServiceRecord( 
Full Snippet Info
5
CodeRank
Related Android BluetoothDevice Questions & Answers:
See Code Examples for Android BluetoothDevice Methods: