APISonar


android.Manifest.permission.BLUETOOTH

> android > Manifest > permission > BLUETOOTH
android APIs Manifest APIs permission APIs BLUETOOTH APIs

Example 1
public static String getBluetoothMAC(Context context) {
        String result = null;
        try {
            if (context.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH)
                    == PackageManager.PERMISSION_GRANTED) {
                BluetoothAdapter bta = BluetoothAdapter.getDefaultAdapter();
                result = bta.getAddress();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
Example 2
public static boolean hasBluetoothPermission(Context context) {
        return hasPermission(context, Manifest.permission.BLUETOOTH)
                && hasPermission(context, Manifest.permission.BLUETOOTH_ADMIN);
    }