Example usage for android.bluetooth BluetoothManager BluetoothManager

List of usage examples for android.bluetooth BluetoothManager BluetoothManager

Introduction

In this page you can find the example usage for android.bluetooth BluetoothManager BluetoothManager.

Prototype

BluetoothManager

Source Link

Usage

From source file:com.juce.jucedemo.JuceDemo.java

public BluetoothManager getAndroidBluetoothManager() {
    BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();

    if (adapter == null)
        return null;

    if (adapter.getBluetoothLeScanner() == null)
        return null;

    synchronized (JuceDemo.class) {
        if (bluetoothManager == null)
            bluetoothManager = new BluetoothManager();
    }// ww w .  j a va2s  .  com

    return bluetoothManager;
}