Search in sources :

Example 1 with BluetoothPeer

use of org.fdroid.fdroid.nearby.peers.BluetoothPeer in project fdroidclient by f-droid.

the class BluetoothManager method sendFoundBroadcast.

private static void sendFoundBroadcast(Context context, BluetoothDevice device) {
    BluetoothPeer bluetoothPeer = BluetoothPeer.getInstance(device);
    if (bluetoothPeer == null) {
        Utils.debugLog(TAG, "IGNORING: " + device);
        return;
    }
    Intent intent = new Intent(ACTION_FOUND);
    intent.putExtra(EXTRA_PEER, bluetoothPeer);
    intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
    LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
}
Also used : BluetoothPeer(org.fdroid.fdroid.nearby.peers.BluetoothPeer) Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)1 BluetoothPeer (org.fdroid.fdroid.nearby.peers.BluetoothPeer)1