Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

The Firefly-RK3288 preview version of Android 5.0 Lollipop firmware release

122

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
122
Posted at 4/5/2015 10:57:33      1#
This version does not support Bluetooth Advertize.
Do support the future?

test code:

    final BluetoothManager manager = (BluetoothManager)getSystemService(Context.BLUETOOTH_SERVICE);
    final BluetoothAdapter bluetoothAdapter = manager.getAdapter();

    // check Bluetooth support
    final boolean isBluetoothSupported = bluetoothAdapter != null;
    if (!isBluetoothSupported) {
        return;
    }
    // check Bluetooth setting is ON
    if (!bluetoothAdapter.isEnabled()) {
        return;
    }
    // check Bluetooth Advertise support
    BluetoothLeAdvertiser mBluetoothLeAdvertiser = bluetoothAdapter.getBluetoothLeAdvertiser();
    final boolean isAdvertiseSupported = mBluetoothLeAdvertiser != null;
    if (!isAdvertiseSupported){
        return;   //  !!!!!!
    }
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list