Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Method m = mmDevice.getClass().getMethod("createRfcommSocket", new Class[] { int.class });
- temp = (BluetoothSocket) m.invoke(mmDevice, 1);
- } catch (Exception e) {
- }
- // Register for broadcasts when a device is discovered
- IntentFilter intentFilter = new IntentFilter();
- intentFilter.addAction(BluetoothDevice.ACTION_FOUND);
- intentFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
- intentFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
- registerReceiver(mReceiver, intentFilter);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement