blob: 6e93ab78a03b25bf8c3fd155d885e030e92b2786 [file] [log] [blame]
// Signature format: 2.0
package android.bluetooth {
public final class BluetoothA2dp implements android.bluetooth.BluetoothProfile {
method public void finalize();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isA2dpPlaying(android.bluetooth.BluetoothDevice);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PLAYING_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED";
field public static final int STATE_NOT_PLAYING = 11; // 0xb
field public static final int STATE_PLAYING = 10; // 0xa
}
public final class BluetoothAdapter {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean cancelDiscovery();
method public static boolean checkBluetoothAddress(String);
method public void closeProfileProxy(int, android.bluetooth.BluetoothProfile);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disable();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean enable();
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, "android.permission.LOCAL_MAC_ADDRESS"}) public String getAddress();
method public android.bluetooth.le.BluetoothLeAdvertiser getBluetoothLeAdvertiser();
method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.Set<android.bluetooth.BluetoothDevice> getBondedDevices();
method @Deprecated public static android.bluetooth.BluetoothAdapter getDefaultAdapter();
method public int getLeMaximumAdvertisingDataLength();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getName();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getProfileConnectionState(int);
method public boolean getProfileProxy(android.content.Context, android.bluetooth.BluetoothProfile.ServiceListener, int);
method public android.bluetooth.BluetoothDevice getRemoteDevice(String);
method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public int getScanMode();
method public int getState();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean isDiscovering();
method public boolean isEnabled();
method public boolean isLe2MPhySupported();
method public boolean isLeCodedPhySupported();
method public boolean isLeExtendedAdvertisingSupported();
method public boolean isLePeriodicAdvertisingSupported();
method public boolean isMultipleAdvertisementSupported();
method public boolean isOffloadedFilteringSupported();
method public boolean isOffloadedScanBatchingSupported();
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingInsecureL2capChannel() throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setName(String);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startDiscovery();
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startLeScan(java.util.UUID[], android.bluetooth.BluetoothAdapter.LeScanCallback);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_DISCOVERY_FINISHED = "android.bluetooth.adapter.action.DISCOVERY_FINISHED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_DISCOVERY_STARTED = "android.bluetooth.adapter.action.DISCOVERY_STARTED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_LOCAL_NAME_CHANGED = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public static final String ACTION_REQUEST_DISCOVERABLE = "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_REQUEST_ENABLE = "android.bluetooth.adapter.action.REQUEST_ENABLE";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_SCAN_MODE_CHANGED = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED";
field public static final String ACTION_STATE_CHANGED = "android.bluetooth.adapter.action.STATE_CHANGED";
field public static final int ERROR = -2147483648; // 0x80000000
field public static final String EXTRA_CONNECTION_STATE = "android.bluetooth.adapter.extra.CONNECTION_STATE";
field public static final String EXTRA_DISCOVERABLE_DURATION = "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION";
field public static final String EXTRA_LOCAL_NAME = "android.bluetooth.adapter.extra.LOCAL_NAME";
field public static final String EXTRA_PREVIOUS_CONNECTION_STATE = "android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE";
field public static final String EXTRA_PREVIOUS_SCAN_MODE = "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE";
field public static final String EXTRA_PREVIOUS_STATE = "android.bluetooth.adapter.extra.PREVIOUS_STATE";
field public static final String EXTRA_SCAN_MODE = "android.bluetooth.adapter.extra.SCAN_MODE";
field public static final String EXTRA_STATE = "android.bluetooth.adapter.extra.STATE";
field public static final int SCAN_MODE_CONNECTABLE = 21; // 0x15
field public static final int SCAN_MODE_CONNECTABLE_DISCOVERABLE = 23; // 0x17
field public static final int SCAN_MODE_NONE = 20; // 0x14
field public static final int STATE_CONNECTED = 2; // 0x2
field public static final int STATE_CONNECTING = 1; // 0x1
field public static final int STATE_DISCONNECTED = 0; // 0x0
field public static final int STATE_DISCONNECTING = 3; // 0x3
field public static final int STATE_OFF = 10; // 0xa
field public static final int STATE_ON = 12; // 0xc
field public static final int STATE_TURNING_OFF = 13; // 0xd
field public static final int STATE_TURNING_ON = 11; // 0xb
}
public static interface BluetoothAdapter.LeScanCallback {
method public void onLeScan(android.bluetooth.BluetoothDevice, int, byte[]);
}
public class BluetoothAssignedNumbers {
field public static final int AAMP_OF_AMERICA = 190; // 0xbe
field public static final int ACCEL_SEMICONDUCTOR = 74; // 0x4a
field public static final int ACE_SENSOR = 188; // 0xbc
field public static final int ADIDAS = 195; // 0xc3
field public static final int ADVANCED_PANMOBIL_SYSTEMS = 145; // 0x91
field public static final int AIROHA_TECHNOLOGY = 148; // 0x94
field public static final int ALCATEL = 36; // 0x24
field public static final int ALPWISE = 154; // 0x9a
field public static final int AMICCOM_ELECTRONICS = 192; // 0xc0
field public static final int APLIX = 189; // 0xbd
field public static final int APPLE = 76; // 0x4c
field public static final int APT_LICENSING = 79; // 0x4f
field public static final int ARCHOS = 207; // 0xcf
field public static final int ARP_DEVICES = 168; // 0xa8
field public static final int ATHEROS_COMMUNICATIONS = 69; // 0x45
field public static final int ATMEL = 19; // 0x13
field public static final int AUSTCO_COMMUNICATION_SYSTEMS = 213; // 0xd5
field public static final int AUTONET_MOBILE = 127; // 0x7f
field public static final int AVAGO = 78; // 0x4e
field public static final int AVM_BERLIN = 31; // 0x1f
field public static final int A_AND_D_ENGINEERING = 105; // 0x69
field public static final int A_AND_R_CAMBRIDGE = 124; // 0x7c
field public static final int BANDSPEED = 32; // 0x20
field public static final int BAND_XI_INTERNATIONAL = 100; // 0x64
field public static final int BDE_TECHNOLOGY = 180; // 0xb4
field public static final int BEATS_ELECTRONICS = 204; // 0xcc
field public static final int BEAUTIFUL_ENTERPRISE = 108; // 0x6c
field public static final int BEKEY = 178; // 0xb2
field public static final int BELKIN_INTERNATIONAL = 92; // 0x5c
field public static final int BINAURIC = 203; // 0xcb
field public static final int BIOSENTRONICS = 219; // 0xdb
field public static final int BLUEGIGA = 71; // 0x47
field public static final int BLUERADIOS = 133; // 0x85
field public static final int BLUETOOTH_SIG = 63; // 0x3f
field public static final int BLUETREK_TECHNOLOGIES = 151; // 0x97
field public static final int BOSE = 158; // 0x9e
field public static final int BRIARTEK = 109; // 0x6d
field public static final int BROADCOM = 15; // 0xf
field public static final int CAEN_RFID = 170; // 0xaa
field public static final int CAMBRIDGE_SILICON_RADIO = 10; // 0xa
field public static final int CATC = 52; // 0x34
field public static final int CINETIX = 175; // 0xaf
field public static final int CLARINOX_TECHNOLOGIES = 179; // 0xb3
field public static final int COLORFY = 156; // 0x9c
field public static final int COMMIL = 51; // 0x33
field public static final int CONEXANT_SYSTEMS = 28; // 0x1c
field public static final int CONNECTBLUE = 113; // 0x71
field public static final int CONTINENTAL_AUTOMOTIVE = 75; // 0x4b
field public static final int CONWISE_TECHNOLOGY = 66; // 0x42
field public static final int CREATIVE_TECHNOLOGY = 118; // 0x76
field public static final int C_TECHNOLOGIES = 38; // 0x26
field public static final int DANLERS = 225; // 0xe1
field public static final int DELORME_PUBLISHING_COMPANY = 128; // 0x80
field public static final int DEXCOM = 208; // 0xd0
field public static final int DIALOG_SEMICONDUCTOR = 210; // 0xd2
field public static final int DIGIANSWER = 12; // 0xc
field public static final int ECLIPSE = 53; // 0x35
field public static final int ECOTEST = 136; // 0x88
field public static final int ELGATO_SYSTEMS = 206; // 0xce
field public static final int EM_MICROELECTRONIC_MARIN = 90; // 0x5a
field public static final int EQUINOX_AG = 134; // 0x86
field public static final int ERICSSON_TECHNOLOGY = 0; // 0x0
field public static final int EVLUMA = 201; // 0xc9
field public static final int FREE2MOVE = 83; // 0x53
field public static final int FUNAI_ELECTRIC = 144; // 0x90
field public static final int GARMIN_INTERNATIONAL = 135; // 0x87
field public static final int GCT_SEMICONDUCTOR = 45; // 0x2d
field public static final int GELO = 200; // 0xc8
field public static final int GENEQ = 194; // 0xc2
field public static final int GENERAL_MOTORS = 104; // 0x68
field public static final int GENNUM = 59; // 0x3b
field public static final int GEOFORCE = 157; // 0x9d
field public static final int GIBSON_GUITARS = 98; // 0x62
field public static final int GN_NETCOM = 103; // 0x67
field public static final int GN_RESOUND = 137; // 0x89
field public static final int GOOGLE = 224; // 0xe0
field public static final int GREEN_THROTTLE_GAMES = 172; // 0xac
field public static final int GROUP_SENSE = 115; // 0x73
field public static final int HANLYNN_TECHNOLOGIES = 123; // 0x7b
field public static final int HARMAN_INTERNATIONAL = 87; // 0x57
field public static final int HEWLETT_PACKARD = 101; // 0x65
field public static final int HITACHI = 41; // 0x29
field public static final int HOSIDEN = 221; // 0xdd
field public static final int IBM = 3; // 0x3
field public static final int INFINEON_TECHNOLOGIES = 9; // 0x9
field public static final int INGENIEUR_SYSTEMGRUPPE_ZAHN = 171; // 0xab
field public static final int INTEGRATED_SILICON_SOLUTION = 65; // 0x41
field public static final int INTEGRATED_SYSTEM_SOLUTION = 57; // 0x39
field public static final int INTEL = 2; // 0x2
field public static final int INVENTEL = 30; // 0x1e
field public static final int IPEXTREME = 61; // 0x3d
field public static final int I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION = 153; // 0x99
field public static final int JAWBONE = 138; // 0x8a
field public static final int JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS = 155; // 0x9b
field public static final int JOHNSON_CONTROLS = 185; // 0xb9
field public static final int J_AND_M = 82; // 0x52
field public static final int KAWANTECH = 212; // 0xd4
field public static final int KC_TECHNOLOGY = 22; // 0x16
field public static final int KENSINGTON_COMPUTER_PRODUCTS_GROUP = 160; // 0xa0
field public static final int LAIRD_TECHNOLOGIES = 119; // 0x77
field public static final int LESSWIRE = 121; // 0x79
field public static final int LG_ELECTRONICS = 196; // 0xc4
field public static final int LINAK = 164; // 0xa4
field public static final int LUCENT = 7; // 0x7
field public static final int LUDUS_HELSINKI = 132; // 0x84
field public static final int MACRONIX = 44; // 0x2c
field public static final int MAGNETI_MARELLI = 169; // 0xa9
field public static final int MANSELLA = 33; // 0x21
field public static final int MARVELL = 72; // 0x48
field public static final int MATSUSHITA_ELECTRIC = 58; // 0x3a
field public static final int MC10 = 202; // 0xca
field public static final int MEDIATEK = 70; // 0x46
field public static final int MESO_INTERNATIONAL = 182; // 0xb6
field public static final int META_WATCH = 163; // 0xa3
field public static final int MEWTEL_TECHNOLOGY = 47; // 0x2f
field public static final int MICOMMAND = 99; // 0x63
field public static final int MICROCHIP_TECHNOLOGY = 205; // 0xcd
field public static final int MICROSOFT = 6; // 0x6
field public static final int MINDTREE = 106; // 0x6a
field public static final int MISFIT_WEARABLES = 223; // 0xdf
field public static final int MITEL_SEMICONDUCTOR = 16; // 0x10
field public static final int MITSUBISHI_ELECTRIC = 20; // 0x14
field public static final int MOBILIAN_CORPORATION = 55; // 0x37
field public static final int MONSTER = 112; // 0x70
field public static final int MOTOROLA = 8; // 0x8
field public static final int MSTAR_SEMICONDUCTOR = 122; // 0x7a
field public static final int MUZIK = 222; // 0xde
field public static final int NEC = 34; // 0x22
field public static final int NEC_LIGHTING = 149; // 0x95
field public static final int NEWLOGIC = 23; // 0x17
field public static final int NIKE = 120; // 0x78
field public static final int NINE_SOLUTIONS = 102; // 0x66
field public static final int NOKIA_MOBILE_PHONES = 1; // 0x1
field public static final int NORDIC_SEMICONDUCTOR = 89; // 0x59
field public static final int NORWOOD_SYSTEMS = 46; // 0x2e
field public static final int ODM_TECHNOLOGY = 150; // 0x96
field public static final int OMEGAWAVE = 174; // 0xae
field public static final int ONSET_COMPUTER = 197; // 0xc5
field public static final int OPEN_INTERFACE = 39; // 0x27
field public static final int OTL_DYNAMICS = 165; // 0xa5
field public static final int PANDA_OCEAN = 166; // 0xa6
field public static final int PARROT = 67; // 0x43
field public static final int PARTHUS_TECHNOLOGIES = 14; // 0xe
field public static final int PASSIF_SEMICONDUCTOR = 176; // 0xb0
field public static final int PETER_SYSTEMTECHNIK = 173; // 0xad
field public static final int PHILIPS_SEMICONDUCTORS = 37; // 0x25
field public static final int PLANTRONICS = 85; // 0x55
field public static final int POLAR_ELECTRO = 107; // 0x6b
field public static final int POLAR_ELECTRO_EUROPE = 209; // 0xd1
field public static final int PROCTER_AND_GAMBLE = 220; // 0xdc
field public static final int QUALCOMM = 29; // 0x1d
field public static final int QUALCOMM_CONNECTED_EXPERIENCES = 216; // 0xd8
field public static final int QUALCOMM_INNOVATION_CENTER = 184; // 0xb8
field public static final int QUALCOMM_LABS = 140; // 0x8c
field public static final int QUALCOMM_TECHNOLOGIES = 215; // 0xd7
field public static final int QUINTIC = 142; // 0x8e
field public static final int QUUPPA = 199; // 0xc7
field public static final int RALINK_TECHNOLOGY = 91; // 0x5b
field public static final int RDA_MICROELECTRONICS = 97; // 0x61
field public static final int REALTEK_SEMICONDUCTOR = 93; // 0x5d
field public static final int RED_M = 50; // 0x32
field public static final int RENESAS_TECHNOLOGY = 54; // 0x36
field public static final int RESEARCH_IN_MOTION = 60; // 0x3c
field public static final int RF_MICRO_DEVICES = 40; // 0x28
field public static final int RIVIERAWAVES = 96; // 0x60
field public static final int ROHDE_AND_SCHWARZ = 25; // 0x19
field public static final int RTX_TELECOM = 21; // 0x15
field public static final int SAMSUNG_ELECTRONICS = 117; // 0x75
field public static final int SARIS_CYCLING_GROUP = 177; // 0xb1
field public static final int SEERS_TECHNOLOGY = 125; // 0x7d
field public static final int SEIKO_EPSON = 64; // 0x40
field public static final int SELFLY = 198; // 0xc6
field public static final int SEMILINK = 226; // 0xe2
field public static final int SENNHEISER_COMMUNICATIONS = 130; // 0x82
field public static final int SHANGHAI_SUPER_SMART_ELECTRONICS = 114; // 0x72
field public static final int SHENZHEN_EXCELSECU_DATA_TECHNOLOGY = 193; // 0xc1
field public static final int SIGNIA_TECHNOLOGIES = 27; // 0x1b
field public static final int SILICON_WAVE = 11; // 0xb
field public static final int SIRF_TECHNOLOGY = 80; // 0x50
field public static final int SOCKET_MOBILE = 68; // 0x44
field public static final int SONY_ERICSSON = 86; // 0x56
field public static final int SOUND_ID = 111; // 0x6f
field public static final int SPORTS_TRACKING_TECHNOLOGIES = 126; // 0x7e
field public static final int SR_MEDIZINELEKTRONIK = 161; // 0xa1
field public static final int STACCATO_COMMUNICATIONS = 77; // 0x4d
field public static final int STALMART_TECHNOLOGY = 191; // 0xbf
field public static final int STARKEY_LABORATORIES = 186; // 0xba
field public static final int STOLLMAN_E_PLUS_V = 143; // 0x8f
field public static final int STONESTREET_ONE = 94; // 0x5e
field public static final int ST_MICROELECTRONICS = 48; // 0x30
field public static final int SUMMIT_DATA_COMMUNICATIONS = 110; // 0x6e
field public static final int SUUNTO = 159; // 0x9f
field public static final int SWIRL_NETWORKS = 181; // 0xb5
field public static final int SYMBOL_TECHNOLOGIES = 42; // 0x2a
field public static final int SYNOPSYS = 49; // 0x31
field public static final int SYSTEMS_AND_CHIPS = 62; // 0x3e
field public static final int S_POWER_ELECTRONICS = 187; // 0xbb
field public static final int TAIXINGBANG_TECHNOLOGY = 211; // 0xd3
field public static final int TENOVIS = 43; // 0x2b
field public static final int TERAX = 56; // 0x38
field public static final int TEXAS_INSTRUMENTS = 13; // 0xd
field public static final int THINKOPTICS = 146; // 0x92
field public static final int THREECOM = 5; // 0x5
field public static final int THREE_DIJOY = 84; // 0x54
field public static final int THREE_DSP = 73; // 0x49
field public static final int TIMEKEEPING_SYSTEMS = 131; // 0x83
field public static final int TIMEX_GROUP_USA = 214; // 0xd6
field public static final int TOPCORN_POSITIONING_SYSTEMS = 139; // 0x8b
field public static final int TOSHIBA = 4; // 0x4
field public static final int TRANSILICA = 24; // 0x18
field public static final int TRELAB = 183; // 0xb7
field public static final int TTPCOM = 26; // 0x1a
field public static final int TXTR = 218; // 0xda
field public static final int TZERO_TECHNOLOGIES = 81; // 0x51
field public static final int UNIVERSAL_ELECTRONICS = 147; // 0x93
field public static final int VERTU = 162; // 0xa2
field public static final int VISTEON = 167; // 0xa7
field public static final int VIZIO = 88; // 0x58
field public static final int VOYETRA_TURTLE_BEACH = 217; // 0xd9
field public static final int WAVEPLUS_TECHNOLOGY = 35; // 0x23
field public static final int WICENTRIC = 95; // 0x5f
field public static final int WIDCOMM = 17; // 0x11
field public static final int WUXI_VIMICRO = 129; // 0x81
field public static final int ZEEVO = 18; // 0x12
field public static final int ZER01_TV = 152; // 0x98
field public static final int ZOMM = 116; // 0x74
field public static final int ZSCAN_SOFTWARE = 141; // 0x8d
}
public final class BluetoothClass implements android.os.Parcelable {
method public int describeContents();
method public int getDeviceClass();
method public int getMajorDeviceClass();
method public boolean hasService(int);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothClass> CREATOR;
}
public static class BluetoothClass.Device {
ctor public BluetoothClass.Device();
field public static final int AUDIO_VIDEO_CAMCORDER = 1076; // 0x434
field public static final int AUDIO_VIDEO_CAR_AUDIO = 1056; // 0x420
field public static final int AUDIO_VIDEO_HANDSFREE = 1032; // 0x408
field public static final int AUDIO_VIDEO_HEADPHONES = 1048; // 0x418
field public static final int AUDIO_VIDEO_HIFI_AUDIO = 1064; // 0x428
field public static final int AUDIO_VIDEO_LOUDSPEAKER = 1044; // 0x414
field public static final int AUDIO_VIDEO_MICROPHONE = 1040; // 0x410
field public static final int AUDIO_VIDEO_PORTABLE_AUDIO = 1052; // 0x41c
field public static final int AUDIO_VIDEO_SET_TOP_BOX = 1060; // 0x424
field public static final int AUDIO_VIDEO_UNCATEGORIZED = 1024; // 0x400
field public static final int AUDIO_VIDEO_VCR = 1068; // 0x42c
field public static final int AUDIO_VIDEO_VIDEO_CAMERA = 1072; // 0x430
field public static final int AUDIO_VIDEO_VIDEO_CONFERENCING = 1088; // 0x440
field public static final int AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 1084; // 0x43c
field public static final int AUDIO_VIDEO_VIDEO_GAMING_TOY = 1096; // 0x448
field public static final int AUDIO_VIDEO_VIDEO_MONITOR = 1080; // 0x438
field public static final int AUDIO_VIDEO_WEARABLE_HEADSET = 1028; // 0x404
field public static final int COMPUTER_DESKTOP = 260; // 0x104
field public static final int COMPUTER_HANDHELD_PC_PDA = 272; // 0x110
field public static final int COMPUTER_LAPTOP = 268; // 0x10c
field public static final int COMPUTER_PALM_SIZE_PC_PDA = 276; // 0x114
field public static final int COMPUTER_SERVER = 264; // 0x108
field public static final int COMPUTER_UNCATEGORIZED = 256; // 0x100
field public static final int COMPUTER_WEARABLE = 280; // 0x118
field public static final int HEALTH_BLOOD_PRESSURE = 2308; // 0x904
field public static final int HEALTH_DATA_DISPLAY = 2332; // 0x91c
field public static final int HEALTH_GLUCOSE = 2320; // 0x910
field public static final int HEALTH_PULSE_OXIMETER = 2324; // 0x914
field public static final int HEALTH_PULSE_RATE = 2328; // 0x918
field public static final int HEALTH_THERMOMETER = 2312; // 0x908
field public static final int HEALTH_UNCATEGORIZED = 2304; // 0x900
field public static final int HEALTH_WEIGHING = 2316; // 0x90c
field public static final int PHONE_CELLULAR = 516; // 0x204
field public static final int PHONE_CORDLESS = 520; // 0x208
field public static final int PHONE_ISDN = 532; // 0x214
field public static final int PHONE_MODEM_OR_GATEWAY = 528; // 0x210
field public static final int PHONE_SMART = 524; // 0x20c
field public static final int PHONE_UNCATEGORIZED = 512; // 0x200
field public static final int TOY_CONTROLLER = 2064; // 0x810
field public static final int TOY_DOLL_ACTION_FIGURE = 2060; // 0x80c
field public static final int TOY_GAME = 2068; // 0x814
field public static final int TOY_ROBOT = 2052; // 0x804
field public static final int TOY_UNCATEGORIZED = 2048; // 0x800
field public static final int TOY_VEHICLE = 2056; // 0x808
field public static final int WEARABLE_GLASSES = 1812; // 0x714
field public static final int WEARABLE_HELMET = 1808; // 0x710
field public static final int WEARABLE_JACKET = 1804; // 0x70c
field public static final int WEARABLE_PAGER = 1800; // 0x708
field public static final int WEARABLE_UNCATEGORIZED = 1792; // 0x700
field public static final int WEARABLE_WRIST_WATCH = 1796; // 0x704
}
public static class BluetoothClass.Device.Major {
ctor public BluetoothClass.Device.Major();
field public static final int AUDIO_VIDEO = 1024; // 0x400
field public static final int COMPUTER = 256; // 0x100
field public static final int HEALTH = 2304; // 0x900
field public static final int IMAGING = 1536; // 0x600
field public static final int MISC = 0; // 0x0
field public static final int NETWORKING = 768; // 0x300
field public static final int PERIPHERAL = 1280; // 0x500
field public static final int PHONE = 512; // 0x200
field public static final int TOY = 2048; // 0x800
field public static final int UNCATEGORIZED = 7936; // 0x1f00
field public static final int WEARABLE = 1792; // 0x700
}
public static final class BluetoothClass.Service {
ctor public BluetoothClass.Service();
field public static final int AUDIO = 2097152; // 0x200000
field public static final int CAPTURE = 524288; // 0x80000
field public static final int INFORMATION = 8388608; // 0x800000
field public static final int LIMITED_DISCOVERABILITY = 8192; // 0x2000
field public static final int NETWORKING = 131072; // 0x20000
field public static final int OBJECT_TRANSFER = 1048576; // 0x100000
field public static final int POSITIONING = 65536; // 0x10000
field public static final int RENDER = 262144; // 0x40000
field public static final int TELEPHONY = 4194304; // 0x400000
}
public final class BluetoothDevice implements android.os.Parcelable {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int, android.os.Handler);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean createBond();
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createInsecureL2capChannel(int) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
method public int describeContents();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean fetchUuidsWithSdp();
method public String getAddress();
method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getAlias();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothClass getBluetoothClass();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getBondState();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getName();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getType();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelUuid[] getUuids();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int setAlias(@Nullable String);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setPairingConfirmation(boolean);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setPin(byte[]);
method public void writeToParcel(android.os.Parcel, int);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACL_CONNECTED = "android.bluetooth.device.action.ACL_CONNECTED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACL_DISCONNECTED = "android.bluetooth.device.action.ACL_DISCONNECTED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACL_DISCONNECT_REQUESTED = "android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ALIAS_CHANGED = "android.bluetooth.device.action.ALIAS_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_BOND_STATE_CHANGED = "android.bluetooth.device.action.BOND_STATE_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CLASS_CHANGED = "android.bluetooth.device.action.CLASS_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_FOUND = "android.bluetooth.device.action.FOUND";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_NAME_CHANGED = "android.bluetooth.device.action.NAME_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PAIRING_REQUEST = "android.bluetooth.device.action.PAIRING_REQUEST";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_UUID = "android.bluetooth.device.action.UUID";
field public static final int ADDRESS_TYPE_PUBLIC = 0; // 0x0
field public static final int ADDRESS_TYPE_RANDOM = 1; // 0x1
field public static final int BOND_BONDED = 12; // 0xc
field public static final int BOND_BONDING = 11; // 0xb
field public static final int BOND_NONE = 10; // 0xa
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothDevice> CREATOR;
field public static final int DEVICE_TYPE_CLASSIC = 1; // 0x1
field public static final int DEVICE_TYPE_DUAL = 3; // 0x3
field public static final int DEVICE_TYPE_LE = 2; // 0x2
field public static final int DEVICE_TYPE_UNKNOWN = 0; // 0x0
field public static final int ERROR = -2147483648; // 0x80000000
field public static final String EXTRA_BOND_STATE = "android.bluetooth.device.extra.BOND_STATE";
field public static final String EXTRA_CLASS = "android.bluetooth.device.extra.CLASS";
field public static final String EXTRA_DEVICE = "android.bluetooth.device.extra.DEVICE";
field public static final String EXTRA_NAME = "android.bluetooth.device.extra.NAME";
field public static final String EXTRA_PAIRING_KEY = "android.bluetooth.device.extra.PAIRING_KEY";
field public static final String EXTRA_PAIRING_VARIANT = "android.bluetooth.device.extra.PAIRING_VARIANT";
field public static final String EXTRA_PREVIOUS_BOND_STATE = "android.bluetooth.device.extra.PREVIOUS_BOND_STATE";
field public static final String EXTRA_RSSI = "android.bluetooth.device.extra.RSSI";
field public static final String EXTRA_UUID = "android.bluetooth.device.extra.UUID";
field public static final int PAIRING_VARIANT_PASSKEY_CONFIRMATION = 2; // 0x2
field public static final int PAIRING_VARIANT_PIN = 0; // 0x0
field public static final int PHY_LE_1M = 1; // 0x1
field public static final int PHY_LE_1M_MASK = 1; // 0x1
field public static final int PHY_LE_2M = 2; // 0x2
field public static final int PHY_LE_2M_MASK = 2; // 0x2
field public static final int PHY_LE_CODED = 3; // 0x3
field public static final int PHY_LE_CODED_MASK = 4; // 0x4
field public static final int PHY_OPTION_NO_PREFERRED = 0; // 0x0
field public static final int PHY_OPTION_S2 = 1; // 0x1
field public static final int PHY_OPTION_S8 = 2; // 0x2
field public static final int TRANSPORT_AUTO = 0; // 0x0
field public static final int TRANSPORT_BREDR = 1; // 0x1
field public static final int TRANSPORT_LE = 2; // 0x2
}
public final class BluetoothGatt implements android.bluetooth.BluetoothProfile {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void abortReliableWrite();
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void abortReliableWrite(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean beginReliableWrite();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void close();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connect();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void disconnect();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean discoverServices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean executeReliableWrite();
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method public int getConnectionState(android.bluetooth.BluetoothDevice);
method public android.bluetooth.BluetoothDevice getDevice();
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method public android.bluetooth.BluetoothGattService getService(java.util.UUID);
method public java.util.List<android.bluetooth.BluetoothGattService> getServices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readDescriptor(android.bluetooth.BluetoothGattDescriptor);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void readPhy();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readRemoteRssi();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean requestConnectionPriority(int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean requestMtu(int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void setPreferredPhy(int, int, int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor);
field public static final int CONNECTION_PRIORITY_BALANCED = 0; // 0x0
field public static final int CONNECTION_PRIORITY_HIGH = 1; // 0x1
field public static final int CONNECTION_PRIORITY_LOW_POWER = 2; // 0x2
field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f
field public static final int GATT_FAILURE = 257; // 0x101
field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf
field public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 13; // 0xd
field public static final int GATT_INVALID_OFFSET = 7; // 0x7
field public static final int GATT_READ_NOT_PERMITTED = 2; // 0x2
field public static final int GATT_REQUEST_NOT_SUPPORTED = 6; // 0x6
field public static final int GATT_SUCCESS = 0; // 0x0
field public static final int GATT_WRITE_NOT_PERMITTED = 3; // 0x3
}
public abstract class BluetoothGattCallback {
ctor public BluetoothGattCallback();
method public void onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
method public void onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
method public void onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int);
method public void onDescriptorRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
method public void onDescriptorWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
method public void onMtuChanged(android.bluetooth.BluetoothGatt, int, int);
method public void onPhyRead(android.bluetooth.BluetoothGatt, int, int, int);
method public void onPhyUpdate(android.bluetooth.BluetoothGatt, int, int, int);
method public void onReadRemoteRssi(android.bluetooth.BluetoothGatt, int, int);
method public void onReliableWriteCompleted(android.bluetooth.BluetoothGatt, int);
method public void onServiceChanged(@NonNull android.bluetooth.BluetoothGatt);
method public void onServicesDiscovered(android.bluetooth.BluetoothGatt, int);
}
public class BluetoothGattCharacteristic implements android.os.Parcelable {
ctor public BluetoothGattCharacteristic(java.util.UUID, int, int);
method public boolean addDescriptor(android.bluetooth.BluetoothGattDescriptor);
method public int describeContents();
method public android.bluetooth.BluetoothGattDescriptor getDescriptor(java.util.UUID);
method public java.util.List<android.bluetooth.BluetoothGattDescriptor> getDescriptors();
method public Float getFloatValue(int, int);
method public int getInstanceId();
method public Integer getIntValue(int, int);
method public int getPermissions();
method public int getProperties();
method public android.bluetooth.BluetoothGattService getService();
method public String getStringValue(int);
method public java.util.UUID getUuid();
method public byte[] getValue();
method public int getWriteType();
method public boolean setValue(byte[]);
method public boolean setValue(int, int, int);
method public boolean setValue(int, int, int, int);
method public boolean setValue(String);
method public void setWriteType(int);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothGattCharacteristic> CREATOR;
field public static final int FORMAT_FLOAT = 52; // 0x34
field public static final int FORMAT_SFLOAT = 50; // 0x32
field public static final int FORMAT_SINT16 = 34; // 0x22
field public static final int FORMAT_SINT32 = 36; // 0x24
field public static final int FORMAT_SINT8 = 33; // 0x21
field public static final int FORMAT_UINT16 = 18; // 0x12
field public static final int FORMAT_UINT32 = 20; // 0x14
field public static final int FORMAT_UINT8 = 17; // 0x11
field public static final int PERMISSION_READ = 1; // 0x1
field public static final int PERMISSION_READ_ENCRYPTED = 2; // 0x2
field public static final int PERMISSION_READ_ENCRYPTED_MITM = 4; // 0x4
field public static final int PERMISSION_WRITE = 16; // 0x10
field public static final int PERMISSION_WRITE_ENCRYPTED = 32; // 0x20
field public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 64; // 0x40
field public static final int PERMISSION_WRITE_SIGNED = 128; // 0x80
field public static final int PERMISSION_WRITE_SIGNED_MITM = 256; // 0x100
field public static final int PROPERTY_BROADCAST = 1; // 0x1
field public static final int PROPERTY_EXTENDED_PROPS = 128; // 0x80
field public static final int PROPERTY_INDICATE = 32; // 0x20
field public static final int PROPERTY_NOTIFY = 16; // 0x10
field public static final int PROPERTY_READ = 2; // 0x2
field public static final int PROPERTY_SIGNED_WRITE = 64; // 0x40
field public static final int PROPERTY_WRITE = 8; // 0x8
field public static final int PROPERTY_WRITE_NO_RESPONSE = 4; // 0x4
field public static final int WRITE_TYPE_DEFAULT = 2; // 0x2
field public static final int WRITE_TYPE_NO_RESPONSE = 1; // 0x1
field public static final int WRITE_TYPE_SIGNED = 4; // 0x4
field protected java.util.List<android.bluetooth.BluetoothGattDescriptor> mDescriptors;
}
public class BluetoothGattDescriptor implements android.os.Parcelable {
ctor public BluetoothGattDescriptor(java.util.UUID, int);
method public int describeContents();
method public android.bluetooth.BluetoothGattCharacteristic getCharacteristic();
method public int getPermissions();
method public java.util.UUID getUuid();
method public byte[] getValue();
method public boolean setValue(byte[]);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothGattDescriptor> CREATOR;
field public static final byte[] DISABLE_NOTIFICATION_VALUE;
field public static final byte[] ENABLE_INDICATION_VALUE;
field public static final byte[] ENABLE_NOTIFICATION_VALUE;
field public static final int PERMISSION_READ = 1; // 0x1
field public static final int PERMISSION_READ_ENCRYPTED = 2; // 0x2
field public static final int PERMISSION_READ_ENCRYPTED_MITM = 4; // 0x4
field public static final int PERMISSION_WRITE = 16; // 0x10
field public static final int PERMISSION_WRITE_ENCRYPTED = 32; // 0x20
field public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 64; // 0x40
field public static final int PERMISSION_WRITE_SIGNED = 128; // 0x80
field public static final int PERMISSION_WRITE_SIGNED_MITM = 256; // 0x100
}
public final class BluetoothGattServer implements android.bluetooth.BluetoothProfile {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean addService(android.bluetooth.BluetoothGattService);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void cancelConnection(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void clearServices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void close();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connect(android.bluetooth.BluetoothDevice, boolean);
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method public int getConnectionState(android.bluetooth.BluetoothDevice);
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method public android.bluetooth.BluetoothGattService getService(java.util.UUID);
method public java.util.List<android.bluetooth.BluetoothGattService> getServices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean notifyCharacteristicChanged(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothGattCharacteristic, boolean);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void readPhy(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean removeService(android.bluetooth.BluetoothGattService);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean sendResponse(android.bluetooth.BluetoothDevice, int, int, int, byte[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void setPreferredPhy(android.bluetooth.BluetoothDevice, int, int, int);
}
public abstract class BluetoothGattServerCallback {
ctor public BluetoothGattServerCallback();
method public void onCharacteristicReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]);
method public void onConnectionStateChange(android.bluetooth.BluetoothDevice, int, int);
method public void onDescriptorReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattDescriptor);
method public void onDescriptorWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattDescriptor, boolean, boolean, int, byte[]);
method public void onExecuteWrite(android.bluetooth.BluetoothDevice, int, boolean);
method public void onMtuChanged(android.bluetooth.BluetoothDevice, int);
method public void onNotificationSent(android.bluetooth.BluetoothDevice, int);
method public void onPhyRead(android.bluetooth.BluetoothDevice, int, int, int);
method public void onPhyUpdate(android.bluetooth.BluetoothDevice, int, int, int);
method public void onServiceAdded(int, android.bluetooth.BluetoothGattService);
}
public class BluetoothGattService implements android.os.Parcelable {
ctor public BluetoothGattService(java.util.UUID, int);
method public boolean addCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method public boolean addService(android.bluetooth.BluetoothGattService);
method public int describeContents();
method public android.bluetooth.BluetoothGattCharacteristic getCharacteristic(java.util.UUID);
method public java.util.List<android.bluetooth.BluetoothGattCharacteristic> getCharacteristics();
method public java.util.List<android.bluetooth.BluetoothGattService> getIncludedServices();
method public int getInstanceId();
method public int getType();
method public java.util.UUID getUuid();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothGattService> CREATOR;
field public static final int SERVICE_TYPE_PRIMARY = 0; // 0x0
field public static final int SERVICE_TYPE_SECONDARY = 1; // 0x1
field protected java.util.List<android.bluetooth.BluetoothGattCharacteristic> mCharacteristics;
field protected java.util.List<android.bluetooth.BluetoothGattService> mIncludedServices;
}
public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isAudioConnected(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isNoiseReductionSupported(@NonNull android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isVoiceRecognitionSupported(@NonNull android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice, String, String);
method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean startVoiceRecognition(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean stopVoiceRecognition(android.bluetooth.BluetoothDevice);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_AUDIO_STATE_CHANGED = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED";
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_VENDOR_SPECIFIC_HEADSET_EVENT = "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT";
field public static final int AT_CMD_TYPE_ACTION = 4; // 0x4
field public static final int AT_CMD_TYPE_BASIC = 3; // 0x3
field public static final int AT_CMD_TYPE_READ = 0; // 0x0
field public static final int AT_CMD_TYPE_SET = 2; // 0x2
field public static final int AT_CMD_TYPE_TEST = 1; // 0x1
field public static final String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_ARGS";
field public static final String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD";
field public static final String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE";
field public static final int STATE_AUDIO_CONNECTED = 12; // 0xc
field public static final int STATE_AUDIO_CONNECTING = 11; // 0xb
field public static final int STATE_AUDIO_DISCONNECTED = 10; // 0xa
field public static final String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID";
field public static final String VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY = "android.bluetooth.headset.intent.category.companyid";
}
@Deprecated public final class BluetoothHealth implements android.bluetooth.BluetoothProfile {
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connectChannelToSource(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disconnectChannel(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration, int);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelFileDescriptor getMainChannelFd(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean registerSinkAppConfiguration(String, int, android.bluetooth.BluetoothHealthCallback);
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean unregisterAppConfiguration(android.bluetooth.BluetoothHealthAppConfiguration);
field @Deprecated public static final int APP_CONFIG_REGISTRATION_FAILURE = 1; // 0x1
field @Deprecated public static final int APP_CONFIG_REGISTRATION_SUCCESS = 0; // 0x0
field @Deprecated public static final int APP_CONFIG_UNREGISTRATION_FAILURE = 3; // 0x3
field @Deprecated public static final int APP_CONFIG_UNREGISTRATION_SUCCESS = 2; // 0x2
field @Deprecated public static final int CHANNEL_TYPE_RELIABLE = 10; // 0xa
field @Deprecated public static final int CHANNEL_TYPE_STREAMING = 11; // 0xb
field @Deprecated public static final int SINK_ROLE = 2; // 0x2
field @Deprecated public static final int SOURCE_ROLE = 1; // 0x1
field @Deprecated public static final int STATE_CHANNEL_CONNECTED = 2; // 0x2
field @Deprecated public static final int STATE_CHANNEL_CONNECTING = 1; // 0x1
field @Deprecated public static final int STATE_CHANNEL_DISCONNECTED = 0; // 0x0
field @Deprecated public static final int STATE_CHANNEL_DISCONNECTING = 3; // 0x3
}
@Deprecated public final class BluetoothHealthAppConfiguration implements android.os.Parcelable {
method @Deprecated public int describeContents();
method @Deprecated public int getDataType();
method @Deprecated public String getName();
method @Deprecated public int getRole();
method @Deprecated public void writeToParcel(android.os.Parcel, int);
field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHealthAppConfiguration> CREATOR;
}
@Deprecated public abstract class BluetoothHealthCallback {
ctor @Deprecated public BluetoothHealthCallback();
method @Deprecated @BinderThread public void onHealthAppConfigurationStatusChange(android.bluetooth.BluetoothHealthAppConfiguration, int);
method @Deprecated @BinderThread public void onHealthChannelStateChange(android.bluetooth.BluetoothHealthAppConfiguration, android.bluetooth.BluetoothDevice, int, int, android.os.ParcelFileDescriptor, int);
}
public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile {
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED";
}
public final class BluetoothHidDevice implements android.bluetooth.BluetoothProfile {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connect(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disconnect(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean registerApp(android.bluetooth.BluetoothHidDeviceAppSdpSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, java.util.concurrent.Executor, android.bluetooth.BluetoothHidDevice.Callback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean replyReport(android.bluetooth.BluetoothDevice, byte, byte, byte[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean reportError(android.bluetooth.BluetoothDevice, byte);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean sendReport(android.bluetooth.BluetoothDevice, int, byte[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean unregisterApp();
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED";
field public static final byte ERROR_RSP_INVALID_PARAM = 4; // 0x4
field public static final byte ERROR_RSP_INVALID_RPT_ID = 2; // 0x2
field public static final byte ERROR_RSP_NOT_READY = 1; // 0x1
field public static final byte ERROR_RSP_SUCCESS = 0; // 0x0
field public static final byte ERROR_RSP_UNKNOWN = 14; // 0xe
field public static final byte ERROR_RSP_UNSUPPORTED_REQ = 3; // 0x3
field public static final byte PROTOCOL_BOOT_MODE = 0; // 0x0
field public static final byte PROTOCOL_REPORT_MODE = 1; // 0x1
field public static final byte REPORT_TYPE_FEATURE = 3; // 0x3
field public static final byte REPORT_TYPE_INPUT = 1; // 0x1
field public static final byte REPORT_TYPE_OUTPUT = 2; // 0x2
field public static final byte SUBCLASS1_COMBO = -64; // 0xffffffc0
field public static final byte SUBCLASS1_KEYBOARD = 64; // 0x40
field public static final byte SUBCLASS1_MOUSE = -128; // 0xffffff80
field public static final byte SUBCLASS1_NONE = 0; // 0x0
field public static final byte SUBCLASS2_CARD_READER = 6; // 0x6
field public static final byte SUBCLASS2_DIGITIZER_TABLET = 5; // 0x5
field public static final byte SUBCLASS2_GAMEPAD = 2; // 0x2
field public static final byte SUBCLASS2_JOYSTICK = 1; // 0x1
field public static final byte SUBCLASS2_REMOTE_CONTROL = 3; // 0x3
field public static final byte SUBCLASS2_SENSING_DEVICE = 4; // 0x4
field public static final byte SUBCLASS2_UNCATEGORIZED = 0; // 0x0
}
public abstract static class BluetoothHidDevice.Callback {
ctor public BluetoothHidDevice.Callback();
method public void onAppStatusChanged(android.bluetooth.BluetoothDevice, boolean);
method public void onConnectionStateChanged(android.bluetooth.BluetoothDevice, int);
method public void onGetReport(android.bluetooth.BluetoothDevice, byte, byte, int);
method public void onInterruptData(android.bluetooth.BluetoothDevice, byte, byte[]);
method public void onSetProtocol(android.bluetooth.BluetoothDevice, byte);
method public void onSetReport(android.bluetooth.BluetoothDevice, byte, byte, byte[]);
method public void onVirtualCableUnplug(android.bluetooth.BluetoothDevice);
}
public final class BluetoothHidDeviceAppQosSettings implements android.os.Parcelable {
ctor public BluetoothHidDeviceAppQosSettings(int, int, int, int, int, int);
method public int describeContents();
method public int getDelayVariation();
method public int getLatency();
method public int getPeakBandwidth();
method public int getServiceType();
method public int getTokenBucketSize();
method public int getTokenRate();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppQosSettings> CREATOR;
field public static final int MAX = -1; // 0xffffffff
field public static final int SERVICE_BEST_EFFORT = 1; // 0x1
field public static final int SERVICE_GUARANTEED = 2; // 0x2
field public static final int SERVICE_NO_TRAFFIC = 0; // 0x0
}
public final class BluetoothHidDeviceAppSdpSettings implements android.os.Parcelable {
ctor public BluetoothHidDeviceAppSdpSettings(String, String, String, byte, byte[]);
method public int describeContents();
method public String getDescription();
method public byte[] getDescriptors();
method public String getName();
method public String getProvider();
method public byte getSubclass();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppSdpSettings> CREATOR;
}
public final class BluetoothLeAudio implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile {
method public void close();
method protected void finalize();
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]);
field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED = "android.bluetooth.action.LE_AUDIO_CONNECTION_STATE_CHANGED";
}
public final class BluetoothManager {
method public android.bluetooth.BluetoothAdapter getAdapter();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice, int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int, int[]);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGattServer openGattServer(android.content.Context, android.bluetooth.BluetoothGattServerCallback);
}
public interface BluetoothProfile {
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method public int getConnectionState(android.bluetooth.BluetoothDevice);
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
field public static final int A2DP = 2; // 0x2
field public static final String EXTRA_PREVIOUS_STATE = "android.bluetooth.profile.extra.PREVIOUS_STATE";
field public static final String EXTRA_STATE = "android.bluetooth.profile.extra.STATE";
field public static final int GATT = 7; // 0x7
field public static final int GATT_SERVER = 8; // 0x8
field public static final int HEADSET = 1; // 0x1
field @Deprecated public static final int HEALTH = 3; // 0x3
field public static final int HEARING_AID = 21; // 0x15
field public static final int HID_DEVICE = 19; // 0x13
field public static final int SAP = 10; // 0xa
field public static final int STATE_CONNECTED = 2; // 0x2
field public static final int STATE_CONNECTING = 1; // 0x1
field public static final int STATE_DISCONNECTED = 0; // 0x0
field public static final int STATE_DISCONNECTING = 3; // 0x3
}
public static interface BluetoothProfile.ServiceListener {
method public void onServiceConnected(int, android.bluetooth.BluetoothProfile);
method public void onServiceDisconnected(int);
}
public final class BluetoothServerSocket implements java.io.Closeable {
method public android.bluetooth.BluetoothSocket accept() throws java.io.IOException;
method public android.bluetooth.BluetoothSocket accept(int) throws java.io.IOException;
method public void close() throws java.io.IOException;
method public int getPsm();
}
public final class BluetoothSocket implements java.io.Closeable {
method public void close() throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void connect() throws java.io.IOException;
method public int getConnectionType();
method public java.io.InputStream getInputStream() throws java.io.IOException;
method public int getMaxReceivePacketSize();
method public int getMaxTransmitPacketSize();
method public java.io.OutputStream getOutputStream() throws java.io.IOException;
method public android.bluetooth.BluetoothDevice getRemoteDevice();
method public boolean isConnected();
field public static final int TYPE_L2CAP = 3; // 0x3
field public static final int TYPE_RFCOMM = 1; // 0x1
field public static final int TYPE_SCO = 2; // 0x2
}
public final class BluetoothStatusCodes {
field public static final int ERROR_BLUETOOTH_NOT_ALLOWED = 2; // 0x2
field public static final int ERROR_BLUETOOTH_NOT_ENABLED = 1; // 0x1
field public static final int ERROR_DEVICE_NOT_BONDED = 3; // 0x3
field public static final int ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION = 6; // 0x6
field public static final int ERROR_UNKNOWN = 2147483647; // 0x7fffffff
field public static final int SUCCESS = 0; // 0x0
}
}
package android.bluetooth.le {
public abstract class AdvertiseCallback {
ctor public AdvertiseCallback();
method public void onStartFailure(int);
method public void onStartSuccess(android.bluetooth.le.AdvertiseSettings);
field public static final int ADVERTISE_FAILED_ALREADY_STARTED = 3; // 0x3
field public static final int ADVERTISE_FAILED_DATA_TOO_LARGE = 1; // 0x1
field public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 5; // 0x5
field public static final int ADVERTISE_FAILED_INTERNAL_ERROR = 4; // 0x4
field public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS = 2; // 0x2
}
public final class AdvertiseData implements android.os.Parcelable {
method public int describeContents();
method public boolean getIncludeDeviceName();
method public boolean getIncludeTxPowerLevel();
method public android.util.SparseArray<byte[]> getManufacturerSpecificData();
method public java.util.Map<android.os.ParcelUuid,byte[]> getServiceData();
method @NonNull public java.util.List<android.os.ParcelUuid> getServiceSolicitationUuids();
method public java.util.List<android.os.ParcelUuid> getServiceUuids();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertiseData> CREATOR;
}
public static final class AdvertiseData.Builder {
ctor public AdvertiseData.Builder();
method public android.bluetooth.le.AdvertiseData.Builder addManufacturerData(int, byte[]);
method public android.bluetooth.le.AdvertiseData.Builder addServiceData(android.os.ParcelUuid, byte[]);
method @NonNull public android.bluetooth.le.AdvertiseData.Builder addServiceSolicitationUuid(@NonNull android.os.ParcelUuid);
method public android.bluetooth.le.AdvertiseData.Builder addServiceUuid(android.os.ParcelUuid);
method public android.bluetooth.le.AdvertiseData build();
method public android.bluetooth.le.AdvertiseData.Builder setIncludeDeviceName(boolean);
method public android.bluetooth.le.AdvertiseData.Builder setIncludeTxPowerLevel(boolean);
}
public final class AdvertiseSettings implements android.os.Parcelable {
method public int describeContents();
method public int getMode();
method public int getTimeout();
method public int getTxPowerLevel();
method public boolean isConnectable();
method public void writeToParcel(android.os.Parcel, int);
field public static final int ADVERTISE_MODE_BALANCED = 1; // 0x1
field public static final int ADVERTISE_MODE_LOW_LATENCY = 2; // 0x2
field public static final int ADVERTISE_MODE_LOW_POWER = 0; // 0x0
field public static final int ADVERTISE_TX_POWER_HIGH = 3; // 0x3
field public static final int ADVERTISE_TX_POWER_LOW = 1; // 0x1
field public static final int ADVERTISE_TX_POWER_MEDIUM = 2; // 0x2
field public static final int ADVERTISE_TX_POWER_ULTRA_LOW = 0; // 0x0
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertiseSettings> CREATOR;
}
public static final class AdvertiseSettings.Builder {
ctor public AdvertiseSettings.Builder();
method public android.bluetooth.le.AdvertiseSettings build();
method public android.bluetooth.le.AdvertiseSettings.Builder setAdvertiseMode(int);
method public android.bluetooth.le.AdvertiseSettings.Builder setConnectable(boolean);
method public android.bluetooth.le.AdvertiseSettings.Builder setTimeout(int);
method public android.bluetooth.le.AdvertiseSettings.Builder setTxPowerLevel(int);
}
public final class AdvertisingSet {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void enableAdvertising(boolean, int, int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setAdvertisingData(android.bluetooth.le.AdvertiseData);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setPeriodicAdvertisingData(android.bluetooth.le.AdvertiseData);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setPeriodicAdvertisingEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setPeriodicAdvertisingParameters(android.bluetooth.le.PeriodicAdvertisingParameters);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setScanResponseData(android.bluetooth.le.AdvertiseData);
}
public abstract class AdvertisingSetCallback {
ctor public AdvertisingSetCallback();
method public void onAdvertisingDataSet(android.bluetooth.le.AdvertisingSet, int);
method public void onAdvertisingEnabled(android.bluetooth.le.AdvertisingSet, boolean, int);
method public void onAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet, int, int);
method public void onAdvertisingSetStarted(android.bluetooth.le.AdvertisingSet, int, int);
method public void onAdvertisingSetStopped(android.bluetooth.le.AdvertisingSet);
method public void onPeriodicAdvertisingDataSet(android.bluetooth.le.AdvertisingSet, int);
method public void onPeriodicAdvertisingEnabled(android.bluetooth.le.AdvertisingSet, boolean, int);
method public void onPeriodicAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet, int);
method public void onScanResponseDataSet(android.bluetooth.le.AdvertisingSet, int);
field public static final int ADVERTISE_FAILED_ALREADY_STARTED = 3; // 0x3
field public static final int ADVERTISE_FAILED_DATA_TOO_LARGE = 1; // 0x1
field public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 5; // 0x5
field public static final int ADVERTISE_FAILED_INTERNAL_ERROR = 4; // 0x4
field public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS = 2; // 0x2
field public static final int ADVERTISE_SUCCESS = 0; // 0x0
}
public final class AdvertisingSetParameters implements android.os.Parcelable {
method public int describeContents();
method public int getInterval();
method public int getPrimaryPhy();
method public int getSecondaryPhy();
method public int getTxPowerLevel();
method public boolean includeTxPower();
method public boolean isAnonymous();
method public boolean isConnectable();
method public boolean isLegacy();
method public boolean isScannable();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertisingSetParameters> CREATOR;
field public static final int INTERVAL_HIGH = 1600; // 0x640
field public static final int INTERVAL_LOW = 160; // 0xa0
field public static final int INTERVAL_MAX = 16777215; // 0xffffff
field public static final int INTERVAL_MEDIUM = 400; // 0x190
field public static final int INTERVAL_MIN = 160; // 0xa0
field public static final int TX_POWER_HIGH = 1; // 0x1
field public static final int TX_POWER_LOW = -15; // 0xfffffff1
field public static final int TX_POWER_MAX = 1; // 0x1
field public static final int TX_POWER_MEDIUM = -7; // 0xfffffff9
field public static final int TX_POWER_MIN = -127; // 0xffffff81
field public static final int TX_POWER_ULTRA_LOW = -21; // 0xffffffeb
}
public static final class AdvertisingSetParameters.Builder {
ctor public AdvertisingSetParameters.Builder();
method public android.bluetooth.le.AdvertisingSetParameters build();
method public android.bluetooth.le.AdvertisingSetParameters.Builder setAnonymous(boolean);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setConnectable(boolean);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setIncludeTxPower(boolean);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setInterval(int);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setLegacyMode(boolean);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setPrimaryPhy(int);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setScannable(boolean);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setSecondaryPhy(int);
method public android.bluetooth.le.AdvertisingSetParameters.Builder setTxPowerLevel(int);
}
public final class BluetoothLeAdvertiser {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, int, android.bluetooth.le.AdvertisingSetCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, int, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void stopAdvertising(android.bluetooth.le.AdvertiseCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback);
}
public final class BluetoothLeScanner {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void flushPendingScanResults(android.bluetooth.le.ScanCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void startScan(android.bluetooth.le.ScanCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void startScan(java.util.List<android.bluetooth.le.ScanFilter>, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public int startScan(@Nullable java.util.List<android.bluetooth.le.ScanFilter>, @Nullable android.bluetooth.le.ScanSettings, @NonNull android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void stopScan(android.bluetooth.le.ScanCallback);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void stopScan(android.app.PendingIntent);
field public static final String EXTRA_CALLBACK_TYPE = "android.bluetooth.le.extra.CALLBACK_TYPE";
field public static final String EXTRA_ERROR_CODE = "android.bluetooth.le.extra.ERROR_CODE";
field public static final String EXTRA_LIST_SCAN_RESULT = "android.bluetooth.le.extra.LIST_SCAN_RESULT";
}
public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
method public int describeContents();
method public boolean getIncludeTxPower();
method public int getInterval();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.bluetooth.le.PeriodicAdvertisingParameters> CREATOR;
}
public static final class PeriodicAdvertisingParameters.Builder {
ctor public PeriodicAdvertisingParameters.Builder();
method public android.bluetooth.le.PeriodicAdvertisingParameters build();
method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
}
public abstract class ScanCallback {
ctor public ScanCallback();
method public void onBatchScanResults(java.util.List<android.bluetooth.le.ScanResult>);
method public void onScanFailed(int);
method public void onScanResult(int, android.bluetooth.le.ScanResult);
field public static final int SCAN_FAILED_ALREADY_STARTED = 1; // 0x1
field public static final int SCAN_FAILED_APPLICATION_REGISTRATION_FAILED = 2; // 0x2
field public static final int SCAN_FAILED_FEATURE_UNSUPPORTED = 4; // 0x4
field public static final int SCAN_FAILED_INTERNAL_ERROR = 3; // 0x3
}
public final class ScanFilter implements android.os.Parcelable {
method public int describeContents();
method @Nullable public String getDeviceAddress();
method @Nullable public String getDeviceName();
method @Nullable public byte[] getManufacturerData();
method @Nullable public byte[] getManufacturerDataMask();
method public int getManufacturerId();
method @Nullable public byte[] getServiceData();
method @Nullable public byte[] getServiceDataMask();
method @Nullable public android.os.ParcelUuid getServiceDataUuid();
method @Nullable public android.os.ParcelUuid getServiceSolicitationUuid();
method @Nullable public android.os.ParcelUuid getServiceSolicitationUuidMask();
method @Nullable public android.os.ParcelUuid getServiceUuid();
method @Nullable public android.os.ParcelUuid getServiceUuidMask();
method public boolean matches(android.bluetooth.le.ScanResult);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanFilter> CREATOR;
}
public static final class ScanFilter.Builder {
ctor public ScanFilter.Builder();
method public android.bluetooth.le.ScanFilter build();
method public android.bluetooth.le.ScanFilter.Builder setDeviceAddress(String);
method public android.bluetooth.le.ScanFilter.Builder setDeviceName(String);
method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[]);
method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[], byte[]);
method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[]);
method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[], byte[]);
method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid);
method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid, @Nullable android.os.ParcelUuid);
method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid);
method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
}
public final class ScanRecord {
method public int getAdvertiseFlags();
method public byte[] getBytes();
method @Nullable public String getDeviceName();
method public android.util.SparseArray<byte[]> getManufacturerSpecificData();
method @Nullable public byte[] getManufacturerSpecificData(int);
method public java.util.Map<android.os.ParcelUuid,byte[]> getServiceData();
method @Nullable public byte[] getServiceData(android.os.ParcelUuid);
method @NonNull public java.util.List<android.os.ParcelUuid> getServiceSolicitationUuids();
method public java.util.List<android.os.ParcelUuid> getServiceUuids();
method public int getTxPowerLevel();
}
public final class ScanResult implements android.os.Parcelable {
ctor @Deprecated public ScanResult(android.bluetooth.BluetoothDevice, android.bluetooth.le.ScanRecord, int, long);
ctor public ScanResult(android.bluetooth.BluetoothDevice, int, int, int, int, int, int, int, android.bluetooth.le.ScanRecord, long);
method public int describeContents();
method public int getAdvertisingSid();
method public int getDataStatus();
method public android.bluetooth.BluetoothDevice getDevice();
method public int getPeriodicAdvertisingInterval();
method public int getPrimaryPhy();
method public int getRssi();
method @Nullable public android.bluetooth.le.ScanRecord getScanRecord();
method public int getSecondaryPhy();
method public long getTimestampNanos();
method public int getTxPower();
method public boolean isConnectable();
method public boolean isLegacy();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanResult> CREATOR;
field public static final int DATA_COMPLETE = 0; // 0x0
field public static final int DATA_TRUNCATED = 2; // 0x2
field public static final int PERIODIC_INTERVAL_NOT_PRESENT = 0; // 0x0
field public static final int PHY_UNUSED = 0; // 0x0
field public static final int SID_NOT_PRESENT = 255; // 0xff
field public static final int TX_POWER_NOT_PRESENT = 127; // 0x7f
}
public final class ScanSettings implements android.os.Parcelable {
method public int describeContents();
method public int getCallbackType();
method public boolean getLegacy();
method public int getPhy();
method public long getReportDelayMillis();
method public int getScanMode();
method public int getScanResultType();
method public void writeToParcel(android.os.Parcel, int);
field public static final int CALLBACK_TYPE_ALL_MATCHES = 1; // 0x1
field public static final int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2
field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR;
field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1
field public static final int MATCH_MODE_STICKY = 2; // 0x2
field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2
field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3
field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1
field public static final int PHY_LE_ALL_SUPPORTED = 255; // 0xff
field public static final int SCAN_MODE_BALANCED = 1; // 0x1
field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2
field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0
field public static final int SCAN_MODE_OPPORTUNISTIC = -1; // 0xffffffff
}
public static final class ScanSettings.Builder {
ctor public ScanSettings.Builder();
method public android.bluetooth.le.ScanSettings build();
method public android.bluetooth.le.ScanSettings.Builder setCallbackType(int);
method public android.bluetooth.le.ScanSettings.Builder setLegacy(boolean);
method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int);
method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int);
method public android.bluetooth.le.ScanSettings.Builder setPhy(int);
method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long);
method public android.bluetooth.le.ScanSettings.Builder setScanMode(int);
}
}