Skip to content

Instantly share code, notes, and snippets.

View brandonhenricks's full-sized avatar

Brandon Henricks brandonhenricks

View GitHub Profile
@brandonhenricks
brandonhenricks / android-blue-tooth-connection
Last active June 17, 2018 01:05
Bluetooth Socket Creation for Android
public BluetoothSocket createSocketFromAddress(String remoteAddress) {
if (TextUtils.isEmpty(remoteAddress)) return null;
// SPECIAL UUID FOR DEVICE CONNECTION
UUID mSPUUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
BluetoothSocket mSocket = null;
BluetoothDevice mDevice = getAdapter().getRemoteDevice(remoteAddress.toUpperCase());