Added in API level 1
public interface

IBluetoothConfigManager

com.ardic.android.managers.bluetoothconfig.IBluetoothConfigManager

Class Overview

Provides a set of APIs for bluetooth configurations.

For example, bluetooth ON/OFF, retrieve bluetooth state. Block bluetooth interface

Summary

Public Methods
abstract int getBluetoothState()
Returns the current state of the local bluetooth.
abstract String getBluetoothStateString()
Returns the current state in string of the local bluetooth.
abstract boolean isBluetoothBlocked()
Return whether bluetooth is blocked or unblocked.
abstract boolean isBluetoothOn()
Returns whether bluetooth is currently ON/OFF.
abstract boolean setBluetoothBlocked(boolean state)
Sets bluetooth state to blocked.
abstract boolean setBluetoothState(boolean state)
Sets bluetooth ON/OFF (same as the user Setting UI action).

Public Methods

public abstract int getBluetoothState ()

Added in API level 1

Returns the current state of the local bluetooth.

Returns
int Possible bluetooth states;
  • STATE_OFF
  • STATE_TURNING_ON
  • STATE_ON
  • STATE_TURNING_OFF
  • Throws
    AfexException

    public abstract String getBluetoothStateString ()

    Added in API level 1

    Returns the current state in string of the local bluetooth.

    Returns
    String bluetooth state
    Throws
    AfexException

    public abstract boolean isBluetoothBlocked ()

    Added in API level 1

    Return whether bluetooth is blocked or unblocked.

    Returns
    boolean true if bluetooth is blocked, false otherwise
    Throws
    AfexException

    public abstract boolean isBluetoothOn ()

    Added in API level 1

    Returns whether bluetooth is currently ON/OFF.

    Returns
    boolean true if bluetooth is ON else false if it is OFF
    Throws
    AfexException

    public abstract boolean setBluetoothBlocked (boolean state)

    Added in API level 1

    Sets bluetooth state to blocked.

    In Blocking case; Bluetooth is turned OFF ( setBluetoothState(boolean) ) and it is blocked.

    The bluetooth can not be turned ON until it is unblocked.

    In Unblocking case; bluetooth is unblocked and it is turned ON ( setBluetoothState(boolean) )

    Parameters
    state boolean: true to block bluetooth, false to unblock.
    Returns
    boolean true if the operation succeeds (or if the existing state is the same as the requested state) else false
    Throws
    AfexException

    public abstract boolean setBluetoothState (boolean state)

    Added in API level 1

    Sets bluetooth ON/OFF (same as the user Setting UI action).

    Parameters
    state boolean: true to ON, false to OFF
    Returns
    boolean true if operation succeeds else false
    Throws
    AfexException