1// Signature format: 2.0 2package android.bluetooth { 3 4 public final class BluetoothA2dp implements android.bluetooth.BluetoothProfile { 5 method public void finalize(); 6 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 7 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice); 8 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 9 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.Collection<android.bluetooth.BluetoothCodecType> getSupportedCodecTypes(); 10 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isA2dpPlaying(android.bluetooth.BluetoothDevice); 11 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED"; 12 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PLAYING_STATE_CHANGED = "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED"; 13 field public static final int STATE_NOT_PLAYING = 11; // 0xb 14 field public static final int STATE_PLAYING = 10; // 0xa 15 } 16 17 public final class BluetoothAdapter { 18 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean cancelDiscovery(); 19 method public static boolean checkBluetoothAddress(String); 20 method public void closeProfileProxy(int, android.bluetooth.BluetoothProfile); 21 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disable(); 22 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean enable(); 23 method public String getAddress(); 24 method public android.bluetooth.le.BluetoothLeAdvertiser getBluetoothLeAdvertiser(); 25 method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner(); 26 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.Set<android.bluetooth.BluetoothDevice> getBondedDevices(); 27 method @Deprecated public static android.bluetooth.BluetoothAdapter getDefaultAdapter(); 28 method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public java.time.Duration getDiscoverableTimeout(); 29 method public int getLeMaximumAdvertisingDataLength(); 30 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getMaxConnectedAudioDevices(); 31 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getName(); 32 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getProfileConnectionState(int); 33 method public boolean getProfileProxy(android.content.Context, android.bluetooth.BluetoothProfile.ServiceListener, int); 34 method public android.bluetooth.BluetoothDevice getRemoteDevice(String); 35 method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]); 36 method @NonNull public android.bluetooth.BluetoothDevice getRemoteLeDevice(@NonNull String, int); 37 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public int getScanMode(); 38 method public int getState(); 39 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean isDiscovering(); 40 method public boolean isEnabled(); 41 method public boolean isLe2MPhySupported(); 42 method public int isLeAudioBroadcastAssistantSupported(); 43 method public int isLeAudioBroadcastSourceSupported(); 44 method public int isLeAudioSupported(); 45 method public boolean isLeCodedPhySupported(); 46 method public boolean isLeExtendedAdvertisingSupported(); 47 method public boolean isLePeriodicAdvertisingSupported(); 48 method public boolean isMultipleAdvertisementSupported(); 49 method public boolean isOffloadedFilteringSupported(); 50 method public boolean isOffloadedScanBatchingSupported(); 51 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingInsecureL2capChannel() throws java.io.IOException; 52 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException; 53 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException; 54 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException; 55 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setName(String); 56 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startDiscovery(); 57 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback); 58 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startLeScan(java.util.UUID[], android.bluetooth.BluetoothAdapter.LeScanCallback); 59 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback); 60 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED"; 61 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_DISCOVERY_FINISHED = "android.bluetooth.adapter.action.DISCOVERY_FINISHED"; 62 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_DISCOVERY_STARTED = "android.bluetooth.adapter.action.DISCOVERY_STARTED"; 63 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_LOCAL_NAME_CHANGED = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED"; 64 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public static final String ACTION_REQUEST_DISCOVERABLE = "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"; 65 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_REQUEST_ENABLE = "android.bluetooth.adapter.action.REQUEST_ENABLE"; 66 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_SCAN_MODE_CHANGED = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED"; 67 field public static final String ACTION_STATE_CHANGED = "android.bluetooth.adapter.action.STATE_CHANGED"; 68 field public static final int ERROR = -2147483648; // 0x80000000 69 field public static final String EXTRA_CONNECTION_STATE = "android.bluetooth.adapter.extra.CONNECTION_STATE"; 70 field public static final String EXTRA_DISCOVERABLE_DURATION = "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION"; 71 field public static final String EXTRA_LOCAL_NAME = "android.bluetooth.adapter.extra.LOCAL_NAME"; 72 field public static final String EXTRA_PREVIOUS_CONNECTION_STATE = "android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE"; 73 field public static final String EXTRA_PREVIOUS_SCAN_MODE = "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE"; 74 field public static final String EXTRA_PREVIOUS_STATE = "android.bluetooth.adapter.extra.PREVIOUS_STATE"; 75 field public static final String EXTRA_SCAN_MODE = "android.bluetooth.adapter.extra.SCAN_MODE"; 76 field public static final String EXTRA_STATE = "android.bluetooth.adapter.extra.STATE"; 77 field public static final int SCAN_MODE_CONNECTABLE = 21; // 0x15 78 field public static final int SCAN_MODE_CONNECTABLE_DISCOVERABLE = 23; // 0x17 79 field public static final int SCAN_MODE_NONE = 20; // 0x14 80 field public static final int STATE_CONNECTED = 2; // 0x2 81 field public static final int STATE_CONNECTING = 1; // 0x1 82 field public static final int STATE_DISCONNECTED = 0; // 0x0 83 field public static final int STATE_DISCONNECTING = 3; // 0x3 84 field public static final int STATE_OFF = 10; // 0xa 85 field public static final int STATE_ON = 12; // 0xc 86 field public static final int STATE_TURNING_OFF = 13; // 0xd 87 field public static final int STATE_TURNING_ON = 11; // 0xb 88 } 89 90 public static interface BluetoothAdapter.LeScanCallback { 91 method public void onLeScan(android.bluetooth.BluetoothDevice, int, byte[]); 92 } 93 94 public class BluetoothAssignedNumbers { 95 field public static final int AAMP_OF_AMERICA = 190; // 0xbe 96 field public static final int ACCEL_SEMICONDUCTOR = 74; // 0x4a 97 field public static final int ACE_SENSOR = 188; // 0xbc 98 field public static final int ADIDAS = 195; // 0xc3 99 field public static final int ADVANCED_PANMOBIL_SYSTEMS = 145; // 0x91 100 field public static final int AIROHA_TECHNOLOGY = 148; // 0x94 101 field public static final int ALCATEL = 36; // 0x24 102 field public static final int ALPWISE = 154; // 0x9a 103 field public static final int AMICCOM_ELECTRONICS = 192; // 0xc0 104 field public static final int APLIX = 189; // 0xbd 105 field public static final int APPLE = 76; // 0x4c 106 field public static final int APT_LICENSING = 79; // 0x4f 107 field public static final int ARCHOS = 207; // 0xcf 108 field public static final int ARP_DEVICES = 168; // 0xa8 109 field public static final int ATHEROS_COMMUNICATIONS = 69; // 0x45 110 field public static final int ATMEL = 19; // 0x13 111 field public static final int AUSTCO_COMMUNICATION_SYSTEMS = 213; // 0xd5 112 field public static final int AUTONET_MOBILE = 127; // 0x7f 113 field public static final int AVAGO = 78; // 0x4e 114 field public static final int AVM_BERLIN = 31; // 0x1f 115 field public static final int A_AND_D_ENGINEERING = 105; // 0x69 116 field public static final int A_AND_R_CAMBRIDGE = 124; // 0x7c 117 field public static final int BANDSPEED = 32; // 0x20 118 field public static final int BAND_XI_INTERNATIONAL = 100; // 0x64 119 field public static final int BDE_TECHNOLOGY = 180; // 0xb4 120 field public static final int BEATS_ELECTRONICS = 204; // 0xcc 121 field public static final int BEAUTIFUL_ENTERPRISE = 108; // 0x6c 122 field public static final int BEKEY = 178; // 0xb2 123 field public static final int BELKIN_INTERNATIONAL = 92; // 0x5c 124 field public static final int BINAURIC = 203; // 0xcb 125 field public static final int BIOSENTRONICS = 219; // 0xdb 126 field public static final int BLUEGIGA = 71; // 0x47 127 field public static final int BLUERADIOS = 133; // 0x85 128 field public static final int BLUETOOTH_SIG = 63; // 0x3f 129 field public static final int BLUETREK_TECHNOLOGIES = 151; // 0x97 130 field public static final int BOSE = 158; // 0x9e 131 field public static final int BRIARTEK = 109; // 0x6d 132 field public static final int BROADCOM = 15; // 0xf 133 field public static final int CAEN_RFID = 170; // 0xaa 134 field public static final int CAMBRIDGE_SILICON_RADIO = 10; // 0xa 135 field public static final int CATC = 52; // 0x34 136 field public static final int CINETIX = 175; // 0xaf 137 field public static final int CLARINOX_TECHNOLOGIES = 179; // 0xb3 138 field public static final int COLORFY = 156; // 0x9c 139 field public static final int COMMIL = 51; // 0x33 140 field public static final int CONEXANT_SYSTEMS = 28; // 0x1c 141 field public static final int CONNECTBLUE = 113; // 0x71 142 field public static final int CONTINENTAL_AUTOMOTIVE = 75; // 0x4b 143 field public static final int CONWISE_TECHNOLOGY = 66; // 0x42 144 field public static final int CREATIVE_TECHNOLOGY = 118; // 0x76 145 field public static final int C_TECHNOLOGIES = 38; // 0x26 146 field public static final int DANLERS = 225; // 0xe1 147 field public static final int DELORME_PUBLISHING_COMPANY = 128; // 0x80 148 field public static final int DEXCOM = 208; // 0xd0 149 field public static final int DIALOG_SEMICONDUCTOR = 210; // 0xd2 150 field public static final int DIGIANSWER = 12; // 0xc 151 field public static final int ECLIPSE = 53; // 0x35 152 field public static final int ECOTEST = 136; // 0x88 153 field public static final int ELGATO_SYSTEMS = 206; // 0xce 154 field public static final int EM_MICROELECTRONIC_MARIN = 90; // 0x5a 155 field public static final int EQUINOX_AG = 134; // 0x86 156 field public static final int ERICSSON_TECHNOLOGY = 0; // 0x0 157 field public static final int EVLUMA = 201; // 0xc9 158 field public static final int FREE2MOVE = 83; // 0x53 159 field public static final int FUNAI_ELECTRIC = 144; // 0x90 160 field public static final int GARMIN_INTERNATIONAL = 135; // 0x87 161 field public static final int GCT_SEMICONDUCTOR = 45; // 0x2d 162 field public static final int GELO = 200; // 0xc8 163 field public static final int GENEQ = 194; // 0xc2 164 field public static final int GENERAL_MOTORS = 104; // 0x68 165 field public static final int GENNUM = 59; // 0x3b 166 field public static final int GEOFORCE = 157; // 0x9d 167 field public static final int GIBSON_GUITARS = 98; // 0x62 168 field public static final int GN_NETCOM = 103; // 0x67 169 field public static final int GN_RESOUND = 137; // 0x89 170 field public static final int GOOGLE = 224; // 0xe0 171 field public static final int GREEN_THROTTLE_GAMES = 172; // 0xac 172 field public static final int GROUP_SENSE = 115; // 0x73 173 field public static final int HANLYNN_TECHNOLOGIES = 123; // 0x7b 174 field public static final int HARMAN_INTERNATIONAL = 87; // 0x57 175 field public static final int HEWLETT_PACKARD = 101; // 0x65 176 field public static final int HITACHI = 41; // 0x29 177 field public static final int HOSIDEN = 221; // 0xdd 178 field public static final int IBM = 3; // 0x3 179 field public static final int INFINEON_TECHNOLOGIES = 9; // 0x9 180 field public static final int INGENIEUR_SYSTEMGRUPPE_ZAHN = 171; // 0xab 181 field public static final int INTEGRATED_SILICON_SOLUTION = 65; // 0x41 182 field public static final int INTEGRATED_SYSTEM_SOLUTION = 57; // 0x39 183 field public static final int INTEL = 2; // 0x2 184 field public static final int INVENTEL = 30; // 0x1e 185 field public static final int IPEXTREME = 61; // 0x3d 186 field public static final int I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION = 153; // 0x99 187 field public static final int JAWBONE = 138; // 0x8a 188 field public static final int JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS = 155; // 0x9b 189 field public static final int JOHNSON_CONTROLS = 185; // 0xb9 190 field public static final int J_AND_M = 82; // 0x52 191 field public static final int KAWANTECH = 212; // 0xd4 192 field public static final int KC_TECHNOLOGY = 22; // 0x16 193 field public static final int KENSINGTON_COMPUTER_PRODUCTS_GROUP = 160; // 0xa0 194 field public static final int LAIRD_TECHNOLOGIES = 119; // 0x77 195 field public static final int LESSWIRE = 121; // 0x79 196 field public static final int LG_ELECTRONICS = 196; // 0xc4 197 field public static final int LINAK = 164; // 0xa4 198 field public static final int LUCENT = 7; // 0x7 199 field public static final int LUDUS_HELSINKI = 132; // 0x84 200 field public static final int MACRONIX = 44; // 0x2c 201 field public static final int MAGNETI_MARELLI = 169; // 0xa9 202 field public static final int MANSELLA = 33; // 0x21 203 field public static final int MARVELL = 72; // 0x48 204 field public static final int MATSUSHITA_ELECTRIC = 58; // 0x3a 205 field public static final int MC10 = 202; // 0xca 206 field public static final int MEDIATEK = 70; // 0x46 207 field public static final int MESO_INTERNATIONAL = 182; // 0xb6 208 field public static final int META_WATCH = 163; // 0xa3 209 field public static final int MEWTEL_TECHNOLOGY = 47; // 0x2f 210 field public static final int MICOMMAND = 99; // 0x63 211 field public static final int MICROCHIP_TECHNOLOGY = 205; // 0xcd 212 field public static final int MICROSOFT = 6; // 0x6 213 field public static final int MINDTREE = 106; // 0x6a 214 field public static final int MISFIT_WEARABLES = 223; // 0xdf 215 field public static final int MITEL_SEMICONDUCTOR = 16; // 0x10 216 field public static final int MITSUBISHI_ELECTRIC = 20; // 0x14 217 field public static final int MOBILIAN_CORPORATION = 55; // 0x37 218 field public static final int MONSTER = 112; // 0x70 219 field public static final int MOTOROLA = 8; // 0x8 220 field public static final int MSTAR_SEMICONDUCTOR = 122; // 0x7a 221 field public static final int MUZIK = 222; // 0xde 222 field public static final int NEC = 34; // 0x22 223 field public static final int NEC_LIGHTING = 149; // 0x95 224 field public static final int NEWLOGIC = 23; // 0x17 225 field public static final int NIKE = 120; // 0x78 226 field public static final int NINE_SOLUTIONS = 102; // 0x66 227 field public static final int NOKIA_MOBILE_PHONES = 1; // 0x1 228 field public static final int NORDIC_SEMICONDUCTOR = 89; // 0x59 229 field public static final int NORWOOD_SYSTEMS = 46; // 0x2e 230 field public static final int ODM_TECHNOLOGY = 150; // 0x96 231 field public static final int OMEGAWAVE = 174; // 0xae 232 field public static final int ONSET_COMPUTER = 197; // 0xc5 233 field public static final int OPEN_INTERFACE = 39; // 0x27 234 field public static final int OTL_DYNAMICS = 165; // 0xa5 235 field public static final int PANDA_OCEAN = 166; // 0xa6 236 field public static final int PARROT = 67; // 0x43 237 field public static final int PARTHUS_TECHNOLOGIES = 14; // 0xe 238 field public static final int PASSIF_SEMICONDUCTOR = 176; // 0xb0 239 field public static final int PETER_SYSTEMTECHNIK = 173; // 0xad 240 field public static final int PHILIPS_SEMICONDUCTORS = 37; // 0x25 241 field public static final int PLANTRONICS = 85; // 0x55 242 field public static final int POLAR_ELECTRO = 107; // 0x6b 243 field public static final int POLAR_ELECTRO_EUROPE = 209; // 0xd1 244 field public static final int PROCTER_AND_GAMBLE = 220; // 0xdc 245 field public static final int QUALCOMM = 29; // 0x1d 246 field public static final int QUALCOMM_CONNECTED_EXPERIENCES = 216; // 0xd8 247 field public static final int QUALCOMM_INNOVATION_CENTER = 184; // 0xb8 248 field public static final int QUALCOMM_LABS = 140; // 0x8c 249 field public static final int QUALCOMM_TECHNOLOGIES = 215; // 0xd7 250 field public static final int QUINTIC = 142; // 0x8e 251 field public static final int QUUPPA = 199; // 0xc7 252 field public static final int RALINK_TECHNOLOGY = 91; // 0x5b 253 field public static final int RDA_MICROELECTRONICS = 97; // 0x61 254 field public static final int REALTEK_SEMICONDUCTOR = 93; // 0x5d 255 field public static final int RED_M = 50; // 0x32 256 field public static final int RENESAS_TECHNOLOGY = 54; // 0x36 257 field public static final int RESEARCH_IN_MOTION = 60; // 0x3c 258 field public static final int RF_MICRO_DEVICES = 40; // 0x28 259 field public static final int RIVIERAWAVES = 96; // 0x60 260 field public static final int ROHDE_AND_SCHWARZ = 25; // 0x19 261 field public static final int RTX_TELECOM = 21; // 0x15 262 field public static final int SAMSUNG_ELECTRONICS = 117; // 0x75 263 field public static final int SARIS_CYCLING_GROUP = 177; // 0xb1 264 field public static final int SEERS_TECHNOLOGY = 125; // 0x7d 265 field public static final int SEIKO_EPSON = 64; // 0x40 266 field public static final int SELFLY = 198; // 0xc6 267 field public static final int SEMILINK = 226; // 0xe2 268 field public static final int SENNHEISER_COMMUNICATIONS = 130; // 0x82 269 field public static final int SHANGHAI_SUPER_SMART_ELECTRONICS = 114; // 0x72 270 field public static final int SHENZHEN_EXCELSECU_DATA_TECHNOLOGY = 193; // 0xc1 271 field public static final int SIGNIA_TECHNOLOGIES = 27; // 0x1b 272 field public static final int SILICON_WAVE = 11; // 0xb 273 field public static final int SIRF_TECHNOLOGY = 80; // 0x50 274 field public static final int SOCKET_MOBILE = 68; // 0x44 275 field public static final int SONY_ERICSSON = 86; // 0x56 276 field public static final int SOUND_ID = 111; // 0x6f 277 field public static final int SPORTS_TRACKING_TECHNOLOGIES = 126; // 0x7e 278 field public static final int SR_MEDIZINELEKTRONIK = 161; // 0xa1 279 field public static final int STACCATO_COMMUNICATIONS = 77; // 0x4d 280 field public static final int STALMART_TECHNOLOGY = 191; // 0xbf 281 field public static final int STARKEY_LABORATORIES = 186; // 0xba 282 field public static final int STOLLMAN_E_PLUS_V = 143; // 0x8f 283 field public static final int STONESTREET_ONE = 94; // 0x5e 284 field public static final int ST_MICROELECTRONICS = 48; // 0x30 285 field public static final int SUMMIT_DATA_COMMUNICATIONS = 110; // 0x6e 286 field public static final int SUUNTO = 159; // 0x9f 287 field public static final int SWIRL_NETWORKS = 181; // 0xb5 288 field public static final int SYMBOL_TECHNOLOGIES = 42; // 0x2a 289 field public static final int SYNOPSYS = 49; // 0x31 290 field public static final int SYSTEMS_AND_CHIPS = 62; // 0x3e 291 field public static final int S_POWER_ELECTRONICS = 187; // 0xbb 292 field public static final int TAIXINGBANG_TECHNOLOGY = 211; // 0xd3 293 field public static final int TENOVIS = 43; // 0x2b 294 field public static final int TERAX = 56; // 0x38 295 field public static final int TEXAS_INSTRUMENTS = 13; // 0xd 296 field public static final int THINKOPTICS = 146; // 0x92 297 field public static final int THREECOM = 5; // 0x5 298 field public static final int THREE_DIJOY = 84; // 0x54 299 field public static final int THREE_DSP = 73; // 0x49 300 field public static final int TIMEKEEPING_SYSTEMS = 131; // 0x83 301 field public static final int TIMEX_GROUP_USA = 214; // 0xd6 302 field public static final int TOPCORN_POSITIONING_SYSTEMS = 139; // 0x8b 303 field public static final int TOSHIBA = 4; // 0x4 304 field public static final int TRANSILICA = 24; // 0x18 305 field public static final int TRELAB = 183; // 0xb7 306 field public static final int TTPCOM = 26; // 0x1a 307 field public static final int TXTR = 218; // 0xda 308 field public static final int TZERO_TECHNOLOGIES = 81; // 0x51 309 field public static final int UNIVERSAL_ELECTRONICS = 147; // 0x93 310 field public static final int VERTU = 162; // 0xa2 311 field public static final int VISTEON = 167; // 0xa7 312 field public static final int VIZIO = 88; // 0x58 313 field public static final int VOYETRA_TURTLE_BEACH = 217; // 0xd9 314 field public static final int WAVEPLUS_TECHNOLOGY = 35; // 0x23 315 field public static final int WICENTRIC = 95; // 0x5f 316 field public static final int WIDCOMM = 17; // 0x11 317 field public static final int WUXI_VIMICRO = 129; // 0x81 318 field public static final int ZEEVO = 18; // 0x12 319 field public static final int ZER01_TV = 152; // 0x98 320 field public static final int ZOMM = 116; // 0x74 321 field public static final int ZSCAN_SOFTWARE = 141; // 0x8d 322 } 323 324 public final class BluetoothClass implements android.os.Parcelable { 325 method public int describeContents(); 326 method public boolean doesClassMatch(int); 327 method public int getDeviceClass(); 328 method public int getMajorDeviceClass(); 329 method public boolean hasService(int); 330 method public void writeToParcel(android.os.Parcel, int); 331 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothClass> CREATOR; 332 field public static final int PROFILE_A2DP = 1; // 0x1 333 field public static final int PROFILE_HEADSET = 0; // 0x0 334 field public static final int PROFILE_HID = 3; // 0x3 335 } 336 337 public static class BluetoothClass.Device { 338 ctor public BluetoothClass.Device(); 339 field public static final int AUDIO_VIDEO_CAMCORDER = 1076; // 0x434 340 field public static final int AUDIO_VIDEO_CAR_AUDIO = 1056; // 0x420 341 field public static final int AUDIO_VIDEO_HANDSFREE = 1032; // 0x408 342 field public static final int AUDIO_VIDEO_HEADPHONES = 1048; // 0x418 343 field public static final int AUDIO_VIDEO_HIFI_AUDIO = 1064; // 0x428 344 field public static final int AUDIO_VIDEO_LOUDSPEAKER = 1044; // 0x414 345 field public static final int AUDIO_VIDEO_MICROPHONE = 1040; // 0x410 346 field public static final int AUDIO_VIDEO_PORTABLE_AUDIO = 1052; // 0x41c 347 field public static final int AUDIO_VIDEO_SET_TOP_BOX = 1060; // 0x424 348 field public static final int AUDIO_VIDEO_UNCATEGORIZED = 1024; // 0x400 349 field public static final int AUDIO_VIDEO_VCR = 1068; // 0x42c 350 field public static final int AUDIO_VIDEO_VIDEO_CAMERA = 1072; // 0x430 351 field public static final int AUDIO_VIDEO_VIDEO_CONFERENCING = 1088; // 0x440 352 field public static final int AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 1084; // 0x43c 353 field public static final int AUDIO_VIDEO_VIDEO_GAMING_TOY = 1096; // 0x448 354 field public static final int AUDIO_VIDEO_VIDEO_MONITOR = 1080; // 0x438 355 field public static final int AUDIO_VIDEO_WEARABLE_HEADSET = 1028; // 0x404 356 field public static final int COMPUTER_DESKTOP = 260; // 0x104 357 field public static final int COMPUTER_HANDHELD_PC_PDA = 272; // 0x110 358 field public static final int COMPUTER_LAPTOP = 268; // 0x10c 359 field public static final int COMPUTER_PALM_SIZE_PC_PDA = 276; // 0x114 360 field public static final int COMPUTER_SERVER = 264; // 0x108 361 field public static final int COMPUTER_UNCATEGORIZED = 256; // 0x100 362 field public static final int COMPUTER_WEARABLE = 280; // 0x118 363 field public static final int HEALTH_BLOOD_PRESSURE = 2308; // 0x904 364 field public static final int HEALTH_DATA_DISPLAY = 2332; // 0x91c 365 field public static final int HEALTH_GLUCOSE = 2320; // 0x910 366 field public static final int HEALTH_PULSE_OXIMETER = 2324; // 0x914 367 field public static final int HEALTH_PULSE_RATE = 2328; // 0x918 368 field public static final int HEALTH_THERMOMETER = 2312; // 0x908 369 field public static final int HEALTH_UNCATEGORIZED = 2304; // 0x900 370 field public static final int HEALTH_WEIGHING = 2316; // 0x90c 371 field public static final int PERIPHERAL_KEYBOARD = 1344; // 0x540 372 field public static final int PERIPHERAL_KEYBOARD_POINTING = 1472; // 0x5c0 373 field public static final int PERIPHERAL_NON_KEYBOARD_NON_POINTING = 1280; // 0x500 374 field public static final int PERIPHERAL_POINTING = 1408; // 0x580 375 field public static final int PHONE_CELLULAR = 516; // 0x204 376 field public static final int PHONE_CORDLESS = 520; // 0x208 377 field public static final int PHONE_ISDN = 532; // 0x214 378 field public static final int PHONE_MODEM_OR_GATEWAY = 528; // 0x210 379 field public static final int PHONE_SMART = 524; // 0x20c 380 field public static final int PHONE_UNCATEGORIZED = 512; // 0x200 381 field public static final int TOY_CONTROLLER = 2064; // 0x810 382 field public static final int TOY_DOLL_ACTION_FIGURE = 2060; // 0x80c 383 field public static final int TOY_GAME = 2068; // 0x814 384 field public static final int TOY_ROBOT = 2052; // 0x804 385 field public static final int TOY_UNCATEGORIZED = 2048; // 0x800 386 field public static final int TOY_VEHICLE = 2056; // 0x808 387 field public static final int WEARABLE_GLASSES = 1812; // 0x714 388 field public static final int WEARABLE_HELMET = 1808; // 0x710 389 field public static final int WEARABLE_JACKET = 1804; // 0x70c 390 field public static final int WEARABLE_PAGER = 1800; // 0x708 391 field public static final int WEARABLE_UNCATEGORIZED = 1792; // 0x700 392 field public static final int WEARABLE_WRIST_WATCH = 1796; // 0x704 393 } 394 395 public static class BluetoothClass.Device.Major { 396 ctor public BluetoothClass.Device.Major(); 397 field public static final int AUDIO_VIDEO = 1024; // 0x400 398 field public static final int COMPUTER = 256; // 0x100 399 field public static final int HEALTH = 2304; // 0x900 400 field public static final int IMAGING = 1536; // 0x600 401 field public static final int MISC = 0; // 0x0 402 field public static final int NETWORKING = 768; // 0x300 403 field public static final int PERIPHERAL = 1280; // 0x500 404 field public static final int PHONE = 512; // 0x200 405 field public static final int TOY = 2048; // 0x800 406 field public static final int UNCATEGORIZED = 7936; // 0x1f00 407 field public static final int WEARABLE = 1792; // 0x700 408 } 409 410 public static final class BluetoothClass.Service { 411 ctor public BluetoothClass.Service(); 412 field public static final int AUDIO = 2097152; // 0x200000 413 field public static final int CAPTURE = 524288; // 0x80000 414 field public static final int INFORMATION = 8388608; // 0x800000 415 field public static final int LE_AUDIO = 16384; // 0x4000 416 field public static final int LIMITED_DISCOVERABILITY = 8192; // 0x2000 417 field public static final int NETWORKING = 131072; // 0x20000 418 field public static final int OBJECT_TRANSFER = 1048576; // 0x100000 419 field public static final int POSITIONING = 65536; // 0x10000 420 field public static final int RENDER = 262144; // 0x40000 421 field public static final int TELEPHONY = 4194304; // 0x400000 422 } 423 424 public final class BluetoothCodecConfig implements android.os.Parcelable { 425 method public int describeContents(); 426 method public int getBitsPerSample(); 427 method public int getChannelMode(); 428 method public int getCodecPriority(); 429 method public long getCodecSpecific1(); 430 method public long getCodecSpecific2(); 431 method public long getCodecSpecific3(); 432 method public long getCodecSpecific4(); 433 method @Deprecated public int getCodecType(); 434 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @Nullable public android.bluetooth.BluetoothCodecType getExtendedCodecType(); 435 method public int getSampleRate(); 436 method public boolean isMandatoryCodec(); 437 method public void writeToParcel(android.os.Parcel, int); 438 field public static final int BITS_PER_SAMPLE_16 = 1; // 0x1 439 field public static final int BITS_PER_SAMPLE_24 = 2; // 0x2 440 field public static final int BITS_PER_SAMPLE_32 = 4; // 0x4 441 field public static final int BITS_PER_SAMPLE_NONE = 0; // 0x0 442 field public static final int CHANNEL_MODE_MONO = 1; // 0x1 443 field public static final int CHANNEL_MODE_NONE = 0; // 0x0 444 field public static final int CHANNEL_MODE_STEREO = 2; // 0x2 445 field public static final int CODEC_PRIORITY_DEFAULT = 0; // 0x0 446 field public static final int CODEC_PRIORITY_DISABLED = -1; // 0xffffffff 447 field public static final int CODEC_PRIORITY_HIGHEST = 1000000; // 0xf4240 448 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothCodecConfig> CREATOR; 449 field public static final int SAMPLE_RATE_176400 = 16; // 0x10 450 field public static final int SAMPLE_RATE_192000 = 32; // 0x20 451 field public static final int SAMPLE_RATE_44100 = 1; // 0x1 452 field public static final int SAMPLE_RATE_48000 = 2; // 0x2 453 field public static final int SAMPLE_RATE_88200 = 4; // 0x4 454 field public static final int SAMPLE_RATE_96000 = 8; // 0x8 455 field public static final int SAMPLE_RATE_NONE = 0; // 0x0 456 field @Deprecated public static final int SOURCE_CODEC_TYPE_AAC = 1; // 0x1 457 field @Deprecated public static final int SOURCE_CODEC_TYPE_APTX = 2; // 0x2 458 field @Deprecated public static final int SOURCE_CODEC_TYPE_APTX_HD = 3; // 0x3 459 field @Deprecated public static final int SOURCE_CODEC_TYPE_INVALID = 1000000; // 0xf4240 460 field @Deprecated public static final int SOURCE_CODEC_TYPE_LC3 = 5; // 0x5 461 field @Deprecated public static final int SOURCE_CODEC_TYPE_LDAC = 4; // 0x4 462 field @Deprecated public static final int SOURCE_CODEC_TYPE_OPUS = 6; // 0x6 463 field @Deprecated public static final int SOURCE_CODEC_TYPE_SBC = 0; // 0x0 464 } 465 466 public static final class BluetoothCodecConfig.Builder { 467 ctor public BluetoothCodecConfig.Builder(); 468 method @NonNull public android.bluetooth.BluetoothCodecConfig build(); 469 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setBitsPerSample(int); 470 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setChannelMode(int); 471 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecPriority(int); 472 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecSpecific1(long); 473 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecSpecific2(long); 474 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecSpecific3(long); 475 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecSpecific4(long); 476 method @Deprecated @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setCodecType(int); 477 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setExtendedCodecType(@Nullable android.bluetooth.BluetoothCodecType); 478 method @NonNull public android.bluetooth.BluetoothCodecConfig.Builder setSampleRate(int); 479 } 480 481 public final class BluetoothCodecStatus implements android.os.Parcelable { 482 method public int describeContents(); 483 method @Nullable public android.bluetooth.BluetoothCodecConfig getCodecConfig(); 484 method @NonNull public java.util.List<android.bluetooth.BluetoothCodecConfig> getCodecsLocalCapabilities(); 485 method @NonNull public java.util.List<android.bluetooth.BluetoothCodecConfig> getCodecsSelectableCapabilities(); 486 method public boolean isCodecConfigSelectable(@Nullable android.bluetooth.BluetoothCodecConfig); 487 method public void writeToParcel(@NonNull android.os.Parcel, int); 488 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothCodecStatus> CREATOR; 489 field public static final String EXTRA_CODEC_STATUS = "android.bluetooth.extra.CODEC_STATUS"; 490 } 491 492 public static final class BluetoothCodecStatus.Builder { 493 ctor public BluetoothCodecStatus.Builder(); 494 method @NonNull public android.bluetooth.BluetoothCodecStatus build(); 495 method @NonNull public android.bluetooth.BluetoothCodecStatus.Builder setCodecConfig(@NonNull android.bluetooth.BluetoothCodecConfig); 496 method @NonNull public android.bluetooth.BluetoothCodecStatus.Builder setCodecsLocalCapabilities(@NonNull java.util.List<android.bluetooth.BluetoothCodecConfig>); 497 method @NonNull public android.bluetooth.BluetoothCodecStatus.Builder setCodecsSelectableCapabilities(@NonNull java.util.List<android.bluetooth.BluetoothCodecConfig>); 498 } 499 500 @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public final class BluetoothCodecType implements android.os.Parcelable { 501 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public int describeContents(); 502 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public long getCodecId(); 503 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull public String getCodecName(); 504 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public boolean isMandatoryCodec(); 505 method @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") public void writeToParcel(@NonNull android.os.Parcel, int); 506 field public static final long CODEC_ID_AAC = 2L; // 0x2L 507 field public static final long CODEC_ID_APTX = 16797695L; // 0x1004fffL 508 field public static final long CODEC_ID_APTX_HD = 604035071L; // 0x2400d7ffL 509 field public static final long CODEC_ID_LDAC = -1442763265L; // 0xffffffffaa012dffL 510 field public static final long CODEC_ID_OPUS = 16834815L; // 0x100e0ffL 511 field public static final long CODEC_ID_SBC = 0L; // 0x0L 512 field @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothCodecType> CREATOR; 513 } 514 515 public final class BluetoothCsipSetCoordinator implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 516 method public void close(); 517 method protected void finalize(); 518 method @NonNull public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 519 method public int getConnectionState(@Nullable android.bluetooth.BluetoothDevice); 520 method @NonNull public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 521 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CSIS_CONNECTION_STATE_CHANGED = "android.bluetooth.action.CSIS_CONNECTION_STATE_CHANGED"; 522 } 523 524 public final class BluetoothDevice implements android.os.Parcelable { 525 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback); 526 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int); 527 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int); 528 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int, android.os.Handler); 529 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean createBond(); 530 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createInsecureL2capChannel(int) throws java.io.IOException; 531 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException; 532 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException; 533 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException; 534 method public int describeContents(); 535 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean fetchUuidsWithSdp(); 536 method public String getAddress(); 537 method @FlaggedApi("com.android.bluetooth.flags.get_address_type_api") public int getAddressType(); 538 method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getAlias(); 539 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothClass getBluetoothClass(); 540 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getBondState(); 541 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getName(); 542 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getType(); 543 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelUuid[] getUuids(); 544 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int setAlias(@Nullable String); 545 method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setPairingConfirmation(boolean); 546 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setPin(byte[]); 547 method public void writeToParcel(android.os.Parcel, int); 548 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACL_CONNECTED = "android.bluetooth.device.action.ACL_CONNECTED"; 549 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACL_DISCONNECTED = "android.bluetooth.device.action.ACL_DISCONNECTED"; 550 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACL_DISCONNECT_REQUESTED = "android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED"; 551 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ALIAS_CHANGED = "android.bluetooth.device.action.ALIAS_CHANGED"; 552 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_BOND_STATE_CHANGED = "android.bluetooth.device.action.BOND_STATE_CHANGED"; 553 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CLASS_CHANGED = "android.bluetooth.device.action.CLASS_CHANGED"; 554 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public static final String ACTION_FOUND = "android.bluetooth.device.action.FOUND"; 555 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_NAME_CHANGED = "android.bluetooth.device.action.NAME_CHANGED"; 556 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_PAIRING_REQUEST = "android.bluetooth.device.action.PAIRING_REQUEST"; 557 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_UUID = "android.bluetooth.device.action.UUID"; 558 field @FlaggedApi("com.android.bluetooth.flags.get_address_type_api") public static final int ADDRESS_TYPE_ANONYMOUS = 255; // 0xff 559 field public static final int ADDRESS_TYPE_PUBLIC = 0; // 0x0 560 field public static final int ADDRESS_TYPE_RANDOM = 1; // 0x1 561 field public static final int ADDRESS_TYPE_UNKNOWN = 65535; // 0xffff 562 field public static final int BOND_BONDED = 12; // 0xc 563 field public static final int BOND_BONDING = 11; // 0xb 564 field public static final int BOND_NONE = 10; // 0xa 565 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothDevice> CREATOR; 566 field public static final int DEVICE_TYPE_CLASSIC = 1; // 0x1 567 field public static final int DEVICE_TYPE_DUAL = 3; // 0x3 568 field public static final int DEVICE_TYPE_LE = 2; // 0x2 569 field public static final int DEVICE_TYPE_UNKNOWN = 0; // 0x0 570 field public static final int ERROR = -2147483648; // 0x80000000 571 field public static final String EXTRA_BOND_STATE = "android.bluetooth.device.extra.BOND_STATE"; 572 field public static final String EXTRA_CLASS = "android.bluetooth.device.extra.CLASS"; 573 field public static final String EXTRA_DEVICE = "android.bluetooth.device.extra.DEVICE"; 574 field public static final String EXTRA_IS_COORDINATED_SET_MEMBER = "android.bluetooth.extra.IS_COORDINATED_SET_MEMBER"; 575 field public static final String EXTRA_NAME = "android.bluetooth.device.extra.NAME"; 576 field public static final String EXTRA_PAIRING_KEY = "android.bluetooth.device.extra.PAIRING_KEY"; 577 field public static final String EXTRA_PAIRING_VARIANT = "android.bluetooth.device.extra.PAIRING_VARIANT"; 578 field public static final String EXTRA_PREVIOUS_BOND_STATE = "android.bluetooth.device.extra.PREVIOUS_BOND_STATE"; 579 field public static final String EXTRA_RSSI = "android.bluetooth.device.extra.RSSI"; 580 field public static final String EXTRA_TRANSPORT = "android.bluetooth.device.extra.TRANSPORT"; 581 field public static final String EXTRA_UUID = "android.bluetooth.device.extra.UUID"; 582 field public static final int PAIRING_VARIANT_PASSKEY_CONFIRMATION = 2; // 0x2 583 field public static final int PAIRING_VARIANT_PIN = 0; // 0x0 584 field public static final int PHY_LE_1M = 1; // 0x1 585 field public static final int PHY_LE_1M_MASK = 1; // 0x1 586 field public static final int PHY_LE_2M = 2; // 0x2 587 field public static final int PHY_LE_2M_MASK = 2; // 0x2 588 field public static final int PHY_LE_CODED = 3; // 0x3 589 field public static final int PHY_LE_CODED_MASK = 4; // 0x4 590 field public static final int PHY_OPTION_NO_PREFERRED = 0; // 0x0 591 field public static final int PHY_OPTION_S2 = 1; // 0x1 592 field public static final int PHY_OPTION_S8 = 2; // 0x2 593 field public static final int TRANSPORT_AUTO = 0; // 0x0 594 field public static final int TRANSPORT_BREDR = 1; // 0x1 595 field public static final int TRANSPORT_LE = 2; // 0x2 596 } 597 598 public final class BluetoothGatt implements android.bluetooth.BluetoothProfile { 599 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void abortReliableWrite(); 600 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void abortReliableWrite(android.bluetooth.BluetoothDevice); 601 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean beginReliableWrite(); 602 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void close(); 603 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connect(); 604 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void disconnect(); 605 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean discoverServices(); 606 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean executeReliableWrite(); 607 method @Deprecated public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 608 method @Deprecated public int getConnectionState(android.bluetooth.BluetoothDevice); 609 method public android.bluetooth.BluetoothDevice getDevice(); 610 method @Deprecated public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 611 method public android.bluetooth.BluetoothGattService getService(java.util.UUID); 612 method public java.util.List<android.bluetooth.BluetoothGattService> getServices(); 613 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic); 614 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readDescriptor(android.bluetooth.BluetoothGattDescriptor); 615 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void readPhy(); 616 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readRemoteRssi(); 617 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean requestConnectionPriority(int); 618 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean requestMtu(int); 619 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean); 620 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void setPreferredPhy(int, int, int); 621 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic); 622 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int writeCharacteristic(@NonNull android.bluetooth.BluetoothGattCharacteristic, @NonNull byte[], int); 623 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor); 624 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int writeDescriptor(@NonNull android.bluetooth.BluetoothGattDescriptor, @NonNull byte[]); 625 field public static final int CONNECTION_PRIORITY_BALANCED = 0; // 0x0 626 field public static final int CONNECTION_PRIORITY_DCK = 3; // 0x3 627 field public static final int CONNECTION_PRIORITY_HIGH = 1; // 0x1 628 field public static final int CONNECTION_PRIORITY_LOW_POWER = 2; // 0x2 629 field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f 630 field @FlaggedApi("com.android.bluetooth.flags.enumerate_gatt_errors") public static final int GATT_CONNECTION_TIMEOUT = 147; // 0x93 631 field public static final int GATT_FAILURE = 257; // 0x101 632 field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5 633 field public static final int GATT_INSUFFICIENT_AUTHORIZATION = 8; // 0x8 634 field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf 635 field public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 13; // 0xd 636 field public static final int GATT_INVALID_OFFSET = 7; // 0x7 637 field public static final int GATT_READ_NOT_PERMITTED = 2; // 0x2 638 field public static final int GATT_REQUEST_NOT_SUPPORTED = 6; // 0x6 639 field public static final int GATT_SUCCESS = 0; // 0x0 640 field public static final int GATT_WRITE_NOT_PERMITTED = 3; // 0x3 641 } 642 643 public abstract class BluetoothGattCallback { 644 ctor public BluetoothGattCallback(); 645 method @Deprecated public void onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic); 646 method public void onCharacteristicChanged(@NonNull android.bluetooth.BluetoothGatt, @NonNull android.bluetooth.BluetoothGattCharacteristic, @NonNull byte[]); 647 method @Deprecated public void onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int); 648 method public void onCharacteristicRead(@NonNull android.bluetooth.BluetoothGatt, @NonNull android.bluetooth.BluetoothGattCharacteristic, @NonNull byte[], int); 649 method public void onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int); 650 method public void onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int); 651 method @Deprecated public void onDescriptorRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int); 652 method public void onDescriptorRead(@NonNull android.bluetooth.BluetoothGatt, @NonNull android.bluetooth.BluetoothGattDescriptor, int, @NonNull byte[]); 653 method public void onDescriptorWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int); 654 method public void onMtuChanged(android.bluetooth.BluetoothGatt, int, int); 655 method public void onPhyRead(android.bluetooth.BluetoothGatt, int, int, int); 656 method public void onPhyUpdate(android.bluetooth.BluetoothGatt, int, int, int); 657 method public void onReadRemoteRssi(android.bluetooth.BluetoothGatt, int, int); 658 method public void onReliableWriteCompleted(android.bluetooth.BluetoothGatt, int); 659 method public void onServiceChanged(@NonNull android.bluetooth.BluetoothGatt); 660 method public void onServicesDiscovered(android.bluetooth.BluetoothGatt, int); 661 } 662 663 public class BluetoothGattCharacteristic implements android.os.Parcelable { 664 ctor public BluetoothGattCharacteristic(java.util.UUID, int, int); 665 method public boolean addDescriptor(android.bluetooth.BluetoothGattDescriptor); 666 method public int describeContents(); 667 method public android.bluetooth.BluetoothGattDescriptor getDescriptor(java.util.UUID); 668 method public java.util.List<android.bluetooth.BluetoothGattDescriptor> getDescriptors(); 669 method @Deprecated public Float getFloatValue(int, int); 670 method public int getInstanceId(); 671 method @Deprecated public Integer getIntValue(int, int); 672 method public int getPermissions(); 673 method public int getProperties(); 674 method public android.bluetooth.BluetoothGattService getService(); 675 method @Deprecated public String getStringValue(int); 676 method public java.util.UUID getUuid(); 677 method @Deprecated public byte[] getValue(); 678 method public int getWriteType(); 679 method @Deprecated public boolean setValue(byte[]); 680 method @Deprecated public boolean setValue(int, int, int); 681 method @Deprecated public boolean setValue(int, int, int, int); 682 method @Deprecated public boolean setValue(String); 683 method public void setWriteType(int); 684 method public void writeToParcel(android.os.Parcel, int); 685 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothGattCharacteristic> CREATOR; 686 field public static final int FORMAT_FLOAT = 52; // 0x34 687 field public static final int FORMAT_SFLOAT = 50; // 0x32 688 field public static final int FORMAT_SINT16 = 34; // 0x22 689 field public static final int FORMAT_SINT32 = 36; // 0x24 690 field public static final int FORMAT_SINT8 = 33; // 0x21 691 field public static final int FORMAT_UINT16 = 18; // 0x12 692 field public static final int FORMAT_UINT32 = 20; // 0x14 693 field public static final int FORMAT_UINT8 = 17; // 0x11 694 field public static final int PERMISSION_READ = 1; // 0x1 695 field public static final int PERMISSION_READ_ENCRYPTED = 2; // 0x2 696 field public static final int PERMISSION_READ_ENCRYPTED_MITM = 4; // 0x4 697 field public static final int PERMISSION_WRITE = 16; // 0x10 698 field public static final int PERMISSION_WRITE_ENCRYPTED = 32; // 0x20 699 field public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 64; // 0x40 700 field public static final int PERMISSION_WRITE_SIGNED = 128; // 0x80 701 field public static final int PERMISSION_WRITE_SIGNED_MITM = 256; // 0x100 702 field public static final int PROPERTY_BROADCAST = 1; // 0x1 703 field public static final int PROPERTY_EXTENDED_PROPS = 128; // 0x80 704 field public static final int PROPERTY_INDICATE = 32; // 0x20 705 field public static final int PROPERTY_NOTIFY = 16; // 0x10 706 field public static final int PROPERTY_READ = 2; // 0x2 707 field public static final int PROPERTY_SIGNED_WRITE = 64; // 0x40 708 field public static final int PROPERTY_WRITE = 8; // 0x8 709 field public static final int PROPERTY_WRITE_NO_RESPONSE = 4; // 0x4 710 field public static final int WRITE_TYPE_DEFAULT = 2; // 0x2 711 field public static final int WRITE_TYPE_NO_RESPONSE = 1; // 0x1 712 field public static final int WRITE_TYPE_SIGNED = 4; // 0x4 713 field protected java.util.List<android.bluetooth.BluetoothGattDescriptor> mDescriptors; 714 } 715 716 public class BluetoothGattDescriptor implements android.os.Parcelable { 717 ctor public BluetoothGattDescriptor(java.util.UUID, int); 718 method public int describeContents(); 719 method public android.bluetooth.BluetoothGattCharacteristic getCharacteristic(); 720 method public int getPermissions(); 721 method public java.util.UUID getUuid(); 722 method @Deprecated public byte[] getValue(); 723 method @Deprecated public boolean setValue(byte[]); 724 method public void writeToParcel(android.os.Parcel, int); 725 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothGattDescriptor> CREATOR; 726 field public static final byte[] DISABLE_NOTIFICATION_VALUE; 727 field public static final byte[] ENABLE_INDICATION_VALUE; 728 field public static final byte[] ENABLE_NOTIFICATION_VALUE; 729 field public static final int PERMISSION_READ = 1; // 0x1 730 field public static final int PERMISSION_READ_ENCRYPTED = 2; // 0x2 731 field public static final int PERMISSION_READ_ENCRYPTED_MITM = 4; // 0x4 732 field public static final int PERMISSION_WRITE = 16; // 0x10 733 field public static final int PERMISSION_WRITE_ENCRYPTED = 32; // 0x20 734 field public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 64; // 0x40 735 field public static final int PERMISSION_WRITE_SIGNED = 128; // 0x80 736 field public static final int PERMISSION_WRITE_SIGNED_MITM = 256; // 0x100 737 } 738 739 public final class BluetoothGattServer implements android.bluetooth.BluetoothProfile { 740 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean addService(android.bluetooth.BluetoothGattService); 741 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void cancelConnection(android.bluetooth.BluetoothDevice); 742 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void clearServices(); 743 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void close(); 744 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connect(android.bluetooth.BluetoothDevice, boolean); 745 method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 746 method public int getConnectionState(android.bluetooth.BluetoothDevice); 747 method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 748 method public android.bluetooth.BluetoothGattService getService(java.util.UUID); 749 method public java.util.List<android.bluetooth.BluetoothGattService> getServices(); 750 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean notifyCharacteristicChanged(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothGattCharacteristic, boolean); 751 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int notifyCharacteristicChanged(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothGattCharacteristic, boolean, @NonNull byte[]); 752 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void readPhy(android.bluetooth.BluetoothDevice); 753 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean removeService(android.bluetooth.BluetoothGattService); 754 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean sendResponse(android.bluetooth.BluetoothDevice, int, int, int, byte[]); 755 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void setPreferredPhy(android.bluetooth.BluetoothDevice, int, int, int); 756 } 757 758 public abstract class BluetoothGattServerCallback { 759 ctor public BluetoothGattServerCallback(); 760 method public void onCharacteristicReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattCharacteristic); 761 method public void onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]); 762 method public void onConnectionStateChange(android.bluetooth.BluetoothDevice, int, int); 763 method public void onDescriptorReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattDescriptor); 764 method public void onDescriptorWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattDescriptor, boolean, boolean, int, byte[]); 765 method public void onExecuteWrite(android.bluetooth.BluetoothDevice, int, boolean); 766 method public void onMtuChanged(android.bluetooth.BluetoothDevice, int); 767 method public void onNotificationSent(android.bluetooth.BluetoothDevice, int); 768 method public void onPhyRead(android.bluetooth.BluetoothDevice, int, int, int); 769 method public void onPhyUpdate(android.bluetooth.BluetoothDevice, int, int, int); 770 method public void onServiceAdded(int, android.bluetooth.BluetoothGattService); 771 } 772 773 public class BluetoothGattService implements android.os.Parcelable { 774 ctor public BluetoothGattService(java.util.UUID, int); 775 method public boolean addCharacteristic(android.bluetooth.BluetoothGattCharacteristic); 776 method public boolean addService(android.bluetooth.BluetoothGattService); 777 method public int describeContents(); 778 method public android.bluetooth.BluetoothGattCharacteristic getCharacteristic(java.util.UUID); 779 method public java.util.List<android.bluetooth.BluetoothGattCharacteristic> getCharacteristics(); 780 method public java.util.List<android.bluetooth.BluetoothGattService> getIncludedServices(); 781 method public int getInstanceId(); 782 method public int getType(); 783 method public java.util.UUID getUuid(); 784 method public void writeToParcel(android.os.Parcel, int); 785 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothGattService> CREATOR; 786 field public static final int SERVICE_TYPE_PRIMARY = 0; // 0x0 787 field public static final int SERVICE_TYPE_SECONDARY = 1; // 0x1 788 field protected java.util.List<android.bluetooth.BluetoothGattCharacteristic> mCharacteristics; 789 field protected java.util.List<android.bluetooth.BluetoothGattService> mIncludedServices; 790 } 791 792 public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile { 793 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 794 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice); 795 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 796 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isAudioConnected(android.bluetooth.BluetoothDevice); 797 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isNoiseReductionSupported(@NonNull android.bluetooth.BluetoothDevice); 798 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean isVoiceRecognitionSupported(@NonNull android.bluetooth.BluetoothDevice); 799 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice, String, String); 800 method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean startVoiceRecognition(android.bluetooth.BluetoothDevice); 801 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean stopVoiceRecognition(android.bluetooth.BluetoothDevice); 802 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_AUDIO_STATE_CHANGED = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED"; 803 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED"; 804 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_VENDOR_SPECIFIC_HEADSET_EVENT = "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT"; 805 field public static final int AT_CMD_TYPE_ACTION = 4; // 0x4 806 field public static final int AT_CMD_TYPE_BASIC = 3; // 0x3 807 field public static final int AT_CMD_TYPE_READ = 0; // 0x0 808 field public static final int AT_CMD_TYPE_SET = 2; // 0x2 809 field public static final int AT_CMD_TYPE_TEST = 1; // 0x1 810 field public static final String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_ARGS"; 811 field public static final String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD"; 812 field public static final String EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE"; 813 field public static final int STATE_AUDIO_CONNECTED = 12; // 0xc 814 field public static final int STATE_AUDIO_CONNECTING = 11; // 0xb 815 field public static final int STATE_AUDIO_DISCONNECTED = 10; // 0xa 816 field public static final String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID"; 817 field public static final String VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY = "android.bluetooth.headset.intent.category.companyid"; 818 } 819 820 @Deprecated public final class BluetoothHealth implements android.bluetooth.BluetoothProfile { 821 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connectChannelToSource(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration); 822 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disconnectChannel(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration, int); 823 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 824 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice); 825 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 826 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelFileDescriptor getMainChannelFd(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration); 827 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean registerSinkAppConfiguration(String, int, android.bluetooth.BluetoothHealthCallback); 828 method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean unregisterAppConfiguration(android.bluetooth.BluetoothHealthAppConfiguration); 829 field @Deprecated public static final int APP_CONFIG_REGISTRATION_FAILURE = 1; // 0x1 830 field @Deprecated public static final int APP_CONFIG_REGISTRATION_SUCCESS = 0; // 0x0 831 field @Deprecated public static final int APP_CONFIG_UNREGISTRATION_FAILURE = 3; // 0x3 832 field @Deprecated public static final int APP_CONFIG_UNREGISTRATION_SUCCESS = 2; // 0x2 833 field @Deprecated public static final int CHANNEL_TYPE_RELIABLE = 10; // 0xa 834 field @Deprecated public static final int CHANNEL_TYPE_STREAMING = 11; // 0xb 835 field @Deprecated public static final int SINK_ROLE = 2; // 0x2 836 field @Deprecated public static final int SOURCE_ROLE = 1; // 0x1 837 field @Deprecated public static final int STATE_CHANNEL_CONNECTED = 2; // 0x2 838 field @Deprecated public static final int STATE_CHANNEL_CONNECTING = 1; // 0x1 839 field @Deprecated public static final int STATE_CHANNEL_DISCONNECTED = 0; // 0x0 840 field @Deprecated public static final int STATE_CHANNEL_DISCONNECTING = 3; // 0x3 841 } 842 843 @Deprecated public final class BluetoothHealthAppConfiguration implements android.os.Parcelable { 844 method @Deprecated public int describeContents(); 845 method @Deprecated public int getDataType(); 846 method @Deprecated public String getName(); 847 method @Deprecated public int getRole(); 848 method @Deprecated public void writeToParcel(android.os.Parcel, int); 849 field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHealthAppConfiguration> CREATOR; 850 } 851 852 @Deprecated public abstract class BluetoothHealthCallback { 853 ctor @Deprecated public BluetoothHealthCallback(); 854 method @Deprecated @BinderThread public void onHealthAppConfigurationStatusChange(android.bluetooth.BluetoothHealthAppConfiguration, int); 855 method @Deprecated @BinderThread public void onHealthChannelStateChange(android.bluetooth.BluetoothHealthAppConfiguration, android.bluetooth.BluetoothDevice, int, int, android.os.ParcelFileDescriptor, int); 856 } 857 858 public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile { 859 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 860 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 861 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 862 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED"; 863 } 864 865 public final class BluetoothHidDevice implements android.bluetooth.BluetoothProfile { 866 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean connect(android.bluetooth.BluetoothDevice); 867 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disconnect(android.bluetooth.BluetoothDevice); 868 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 869 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice); 870 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 871 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); 872 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean replyReport(android.bluetooth.BluetoothDevice, byte, byte, byte[]); 873 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean reportError(android.bluetooth.BluetoothDevice, byte); 874 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean sendReport(android.bluetooth.BluetoothDevice, int, byte[]); 875 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean unregisterApp(); 876 field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED"; 877 field public static final byte ERROR_RSP_INVALID_PARAM = 4; // 0x4 878 field public static final byte ERROR_RSP_INVALID_RPT_ID = 2; // 0x2 879 field public static final byte ERROR_RSP_NOT_READY = 1; // 0x1 880 field public static final byte ERROR_RSP_SUCCESS = 0; // 0x0 881 field public static final byte ERROR_RSP_UNKNOWN = 14; // 0xe 882 field public static final byte ERROR_RSP_UNSUPPORTED_REQ = 3; // 0x3 883 field public static final byte PROTOCOL_BOOT_MODE = 0; // 0x0 884 field public static final byte PROTOCOL_REPORT_MODE = 1; // 0x1 885 field public static final byte REPORT_TYPE_FEATURE = 3; // 0x3 886 field public static final byte REPORT_TYPE_INPUT = 1; // 0x1 887 field public static final byte REPORT_TYPE_OUTPUT = 2; // 0x2 888 field public static final byte SUBCLASS1_COMBO = -64; // 0xffffffc0 889 field public static final byte SUBCLASS1_KEYBOARD = 64; // 0x40 890 field public static final byte SUBCLASS1_MOUSE = -128; // 0xffffff80 891 field public static final byte SUBCLASS1_NONE = 0; // 0x0 892 field public static final byte SUBCLASS2_CARD_READER = 6; // 0x6 893 field public static final byte SUBCLASS2_DIGITIZER_TABLET = 5; // 0x5 894 field public static final byte SUBCLASS2_GAMEPAD = 2; // 0x2 895 field public static final byte SUBCLASS2_JOYSTICK = 1; // 0x1 896 field public static final byte SUBCLASS2_REMOTE_CONTROL = 3; // 0x3 897 field public static final byte SUBCLASS2_SENSING_DEVICE = 4; // 0x4 898 field public static final byte SUBCLASS2_UNCATEGORIZED = 0; // 0x0 899 } 900 901 public abstract static class BluetoothHidDevice.Callback { 902 ctor public BluetoothHidDevice.Callback(); 903 method public void onAppStatusChanged(android.bluetooth.BluetoothDevice, boolean); 904 method public void onConnectionStateChanged(android.bluetooth.BluetoothDevice, int); 905 method public void onGetReport(android.bluetooth.BluetoothDevice, byte, byte, int); 906 method public void onInterruptData(android.bluetooth.BluetoothDevice, byte, byte[]); 907 method public void onSetProtocol(android.bluetooth.BluetoothDevice, byte); 908 method public void onSetReport(android.bluetooth.BluetoothDevice, byte, byte, byte[]); 909 method public void onVirtualCableUnplug(android.bluetooth.BluetoothDevice); 910 } 911 912 public final class BluetoothHidDeviceAppQosSettings implements android.os.Parcelable { 913 ctor public BluetoothHidDeviceAppQosSettings(int, int, int, int, int, int); 914 method public int describeContents(); 915 method public int getDelayVariation(); 916 method public int getLatency(); 917 method public int getPeakBandwidth(); 918 method public int getServiceType(); 919 method public int getTokenBucketSize(); 920 method public int getTokenRate(); 921 method public void writeToParcel(android.os.Parcel, int); 922 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppQosSettings> CREATOR; 923 field public static final int MAX = -1; // 0xffffffff 924 field public static final int SERVICE_BEST_EFFORT = 1; // 0x1 925 field public static final int SERVICE_GUARANTEED = 2; // 0x2 926 field public static final int SERVICE_NO_TRAFFIC = 0; // 0x0 927 } 928 929 public final class BluetoothHidDeviceAppSdpSettings implements android.os.Parcelable { 930 ctor public BluetoothHidDeviceAppSdpSettings(String, String, String, byte, byte[]); 931 method public int describeContents(); 932 method public String getDescription(); 933 method public byte[] getDescriptors(); 934 method public String getName(); 935 method public String getProvider(); 936 method public byte getSubclass(); 937 method public void writeToParcel(android.os.Parcel, int); 938 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppSdpSettings> CREATOR; 939 } 940 941 public final class BluetoothLeAudio implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { 942 method public void close(); 943 method protected void finalize(); 944 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 945 method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothDevice getConnectedGroupLeadDevice(int); 946 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); 947 method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]); 948 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getGroupId(@NonNull android.bluetooth.BluetoothDevice); 949 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"; 950 field public static final int GROUP_ID_INVALID = -1; // 0xffffffff 951 } 952 953 public final class BluetoothLeAudioCodecConfig implements android.os.Parcelable { 954 method public int describeContents(); 955 method public int getBitsPerSample(); 956 method public int getChannelCount(); 957 method @NonNull public String getCodecName(); 958 method public int getCodecPriority(); 959 method public int getCodecType(); 960 method public int getFrameDuration(); 961 method public int getMaxOctetsPerFrame(); 962 method public int getMinOctetsPerFrame(); 963 method public int getOctetsPerFrame(); 964 method public int getSampleRate(); 965 method public void writeToParcel(@NonNull android.os.Parcel, int); 966 field public static final int BITS_PER_SAMPLE_16 = 1; // 0x1 967 field public static final int BITS_PER_SAMPLE_24 = 2; // 0x2 968 field public static final int BITS_PER_SAMPLE_32 = 8; // 0x8 969 field public static final int BITS_PER_SAMPLE_NONE = 0; // 0x0 970 field public static final int CHANNEL_COUNT_1 = 1; // 0x1 971 field public static final int CHANNEL_COUNT_2 = 2; // 0x2 972 field public static final int CHANNEL_COUNT_NONE = 0; // 0x0 973 field public static final int CODEC_PRIORITY_DEFAULT = 0; // 0x0 974 field public static final int CODEC_PRIORITY_DISABLED = -1; // 0xffffffff 975 field public static final int CODEC_PRIORITY_HIGHEST = 1000000; // 0xf4240 976 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeAudioCodecConfig> CREATOR; 977 field public static final int FRAME_DURATION_10000 = 2; // 0x2 978 field public static final int FRAME_DURATION_7500 = 1; // 0x1 979 field public static final int FRAME_DURATION_NONE = 0; // 0x0 980 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_11025 = 2; // 0x2 981 field public static final int SAMPLE_RATE_16000 = 4; // 0x4 982 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_176400 = 1024; // 0x400 983 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_192000 = 2048; // 0x800 984 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_22050 = 8; // 0x8 985 field public static final int SAMPLE_RATE_24000 = 16; // 0x10 986 field public static final int SAMPLE_RATE_32000 = 32; // 0x20 987 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_384000 = 4096; // 0x1000 988 field public static final int SAMPLE_RATE_44100 = 64; // 0x40 989 field public static final int SAMPLE_RATE_48000 = 128; // 0x80 990 field public static final int SAMPLE_RATE_8000 = 1; // 0x1 991 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_88200 = 256; // 0x100 992 field @FlaggedApi("com.android.bluetooth.flags.leaudio_add_sampling_frequencies") public static final int SAMPLE_RATE_96000 = 512; // 0x200 993 field public static final int SAMPLE_RATE_NONE = 0; // 0x0 994 field public static final int SOURCE_CODEC_TYPE_INVALID = 1000000; // 0xf4240 995 field public static final int SOURCE_CODEC_TYPE_LC3 = 0; // 0x0 996 } 997 998 public static final class BluetoothLeAudioCodecConfig.Builder { 999 ctor public BluetoothLeAudioCodecConfig.Builder(); 1000 ctor public BluetoothLeAudioCodecConfig.Builder(@NonNull android.bluetooth.BluetoothLeAudioCodecConfig); 1001 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig build(); 1002 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setBitsPerSample(int); 1003 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setChannelCount(int); 1004 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setCodecPriority(int); 1005 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setCodecType(int); 1006 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setFrameDuration(int); 1007 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setMaxOctetsPerFrame(int); 1008 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setMinOctetsPerFrame(int); 1009 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setOctetsPerFrame(int); 1010 method @NonNull public android.bluetooth.BluetoothLeAudioCodecConfig.Builder setSampleRate(int); 1011 } 1012 1013 public final class BluetoothLeAudioCodecStatus implements android.os.Parcelable { 1014 ctor public BluetoothLeAudioCodecStatus(@Nullable android.bluetooth.BluetoothLeAudioCodecConfig, @Nullable android.bluetooth.BluetoothLeAudioCodecConfig, @NonNull java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>, @NonNull java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>, @NonNull java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>, @NonNull java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>); 1015 method public int describeContents(); 1016 method @Nullable public android.bluetooth.BluetoothLeAudioCodecConfig getInputCodecConfig(); 1017 method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getInputCodecLocalCapabilities(); 1018 method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getInputCodecSelectableCapabilities(); 1019 method @Nullable public android.bluetooth.BluetoothLeAudioCodecConfig getOutputCodecConfig(); 1020 method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getOutputCodecLocalCapabilities(); 1021 method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getOutputCodecSelectableCapabilities(); 1022 method public boolean isInputCodecConfigSelectable(@Nullable android.bluetooth.BluetoothLeAudioCodecConfig); 1023 method public boolean isOutputCodecConfigSelectable(@Nullable android.bluetooth.BluetoothLeAudioCodecConfig); 1024 method public void writeToParcel(@NonNull android.os.Parcel, int); 1025 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeAudioCodecStatus> CREATOR; 1026 field public static final String EXTRA_LE_AUDIO_CODEC_STATUS = "android.bluetooth.extra.LE_AUDIO_CODEC_STATUS"; 1027 } 1028 1029 public final class BluetoothManager { 1030 method public android.bluetooth.BluetoothAdapter getAdapter(); 1031 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(int); 1032 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getConnectionState(android.bluetooth.BluetoothDevice, int); 1033 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int, int[]); 1034 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothGattServer openGattServer(android.content.Context, android.bluetooth.BluetoothGattServerCallback); 1035 } 1036 1037 public interface BluetoothProfile { 1038 method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); 1039 method public int getConnectionState(android.bluetooth.BluetoothDevice); 1040 method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]); 1041 field public static final int A2DP = 2; // 0x2 1042 field public static final int CSIP_SET_COORDINATOR = 25; // 0x19 1043 field public static final String EXTRA_PREVIOUS_STATE = "android.bluetooth.profile.extra.PREVIOUS_STATE"; 1044 field public static final String EXTRA_STATE = "android.bluetooth.profile.extra.STATE"; 1045 field public static final int GATT = 7; // 0x7 1046 field public static final int GATT_SERVER = 8; // 0x8 1047 field public static final int HAP_CLIENT = 28; // 0x1c 1048 field public static final int HEADSET = 1; // 0x1 1049 field @Deprecated public static final int HEALTH = 3; // 0x3 1050 field public static final int HEARING_AID = 21; // 0x15 1051 field public static final int HID_DEVICE = 19; // 0x13 1052 field public static final int LE_AUDIO = 22; // 0x16 1053 field public static final int SAP = 10; // 0xa 1054 field public static final int STATE_CONNECTED = 2; // 0x2 1055 field public static final int STATE_CONNECTING = 1; // 0x1 1056 field public static final int STATE_DISCONNECTED = 0; // 0x0 1057 field public static final int STATE_DISCONNECTING = 3; // 0x3 1058 } 1059 1060 public static interface BluetoothProfile.ServiceListener { 1061 method public void onServiceConnected(int, android.bluetooth.BluetoothProfile); 1062 method public void onServiceDisconnected(int); 1063 } 1064 1065 public final class BluetoothServerSocket implements java.io.Closeable { 1066 method public android.bluetooth.BluetoothSocket accept() throws java.io.IOException; 1067 method public android.bluetooth.BluetoothSocket accept(int) throws java.io.IOException; 1068 method public void close() throws java.io.IOException; 1069 method public int getPsm(); 1070 } 1071 1072 public final class BluetoothSocket implements java.io.Closeable { 1073 method public void close() throws java.io.IOException; 1074 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void connect() throws java.io.IOException; 1075 method public int getConnectionType(); 1076 method public java.io.InputStream getInputStream() throws java.io.IOException; 1077 method public int getMaxReceivePacketSize(); 1078 method public int getMaxTransmitPacketSize(); 1079 method public java.io.OutputStream getOutputStream() throws java.io.IOException; 1080 method public android.bluetooth.BluetoothDevice getRemoteDevice(); 1081 method public boolean isConnected(); 1082 field public static final int TYPE_L2CAP = 3; // 0x3 1083 field public static final int TYPE_RFCOMM = 1; // 0x1 1084 field public static final int TYPE_SCO = 2; // 0x2 1085 } 1086 1087 public class BluetoothSocketException extends java.io.IOException { 1088 ctor public BluetoothSocketException(int, @NonNull String); 1089 ctor public BluetoothSocketException(int); 1090 method public int getErrorCode(); 1091 field public static final int BLUETOOTH_OFF_FAILURE = 15; // 0xf 1092 field public static final int L2CAP_ACL_FAILURE = 2; // 0x2 1093 field public static final int L2CAP_CLIENT_SECURITY_FAILURE = 3; // 0x3 1094 field public static final int L2CAP_INSUFFICIENT_AUTHENTICATION = 4; // 0x4 1095 field public static final int L2CAP_INSUFFICIENT_AUTHORIZATION = 5; // 0x5 1096 field public static final int L2CAP_INSUFFICIENT_ENCRYPTION = 7; // 0x7 1097 field public static final int L2CAP_INSUFFICIENT_ENCRYPT_KEY_SIZE = 6; // 0x6 1098 field public static final int L2CAP_INVALID_PARAMETERS = 11; // 0xb 1099 field public static final int L2CAP_INVALID_SOURCE_CID = 8; // 0x8 1100 field public static final int L2CAP_NO_PSM_AVAILABLE = 13; // 0xd 1101 field public static final int L2CAP_NO_RESOURCES = 12; // 0xc 1102 field public static final int L2CAP_SOURCE_CID_ALREADY_ALLOCATED = 9; // 0x9 1103 field public static final int L2CAP_TIMEOUT = 14; // 0xe 1104 field public static final int L2CAP_UNACCEPTABLE_PARAMETERS = 10; // 0xa 1105 field public static final int L2CAP_UNKNOWN = 1; // 0x1 1106 field public static final int NULL_DEVICE = 19; // 0x13 1107 field public static final int RPC_FAILURE = 20; // 0x14 1108 field public static final int SOCKET_CLOSED = 17; // 0x11 1109 field public static final int SOCKET_CONNECTION_FAILURE = 18; // 0x12 1110 field public static final int SOCKET_MANAGER_FAILURE = 16; // 0x10 1111 field @FlaggedApi("com.android.bluetooth.flags.unix_file_socket_creation_failure") public static final int UNIX_FILE_SOCKET_CREATION_FAILURE = 21; // 0x15 1112 field public static final int UNSPECIFIED = 0; // 0x0 1113 } 1114 1115 public final class BluetoothStatusCodes { 1116 field public static final int ERROR_BLUETOOTH_NOT_ALLOWED = 2; // 0x2 1117 field public static final int ERROR_BLUETOOTH_NOT_ENABLED = 1; // 0x1 1118 field public static final int ERROR_DEVICE_NOT_BONDED = 3; // 0x3 1119 field public static final int ERROR_GATT_WRITE_NOT_ALLOWED = 200; // 0xc8 1120 field public static final int ERROR_GATT_WRITE_REQUEST_BUSY = 201; // 0xc9 1121 field public static final int ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION = 6; // 0x6 1122 field public static final int ERROR_PROFILE_SERVICE_NOT_BOUND = 9; // 0x9 1123 field public static final int ERROR_UNKNOWN = 2147483647; // 0x7fffffff 1124 field public static final int FEATURE_NOT_CONFIGURED = 30; // 0x1e 1125 field public static final int FEATURE_NOT_SUPPORTED = 11; // 0xb 1126 field public static final int FEATURE_SUPPORTED = 10; // 0xa 1127 field public static final int SUCCESS = 0; // 0x0 1128 } 1129 1130} 1131 1132package android.bluetooth.le { 1133 1134 public abstract class AdvertiseCallback { 1135 ctor public AdvertiseCallback(); 1136 method public void onStartFailure(int); 1137 method public void onStartSuccess(android.bluetooth.le.AdvertiseSettings); 1138 field public static final int ADVERTISE_FAILED_ALREADY_STARTED = 3; // 0x3 1139 field public static final int ADVERTISE_FAILED_DATA_TOO_LARGE = 1; // 0x1 1140 field public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 5; // 0x5 1141 field public static final int ADVERTISE_FAILED_INTERNAL_ERROR = 4; // 0x4 1142 field public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS = 2; // 0x2 1143 } 1144 1145 public final class AdvertiseData implements android.os.Parcelable { 1146 method public int describeContents(); 1147 method public boolean getIncludeDeviceName(); 1148 method public boolean getIncludeTxPowerLevel(); 1149 method public android.util.SparseArray<byte[]> getManufacturerSpecificData(); 1150 method public java.util.Map<android.os.ParcelUuid,byte[]> getServiceData(); 1151 method @NonNull public java.util.List<android.os.ParcelUuid> getServiceSolicitationUuids(); 1152 method public java.util.List<android.os.ParcelUuid> getServiceUuids(); 1153 method @NonNull public java.util.List<android.bluetooth.le.TransportDiscoveryData> getTransportDiscoveryData(); 1154 method public void writeToParcel(android.os.Parcel, int); 1155 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertiseData> CREATOR; 1156 } 1157 1158 public static final class AdvertiseData.Builder { 1159 ctor public AdvertiseData.Builder(); 1160 method public android.bluetooth.le.AdvertiseData.Builder addManufacturerData(int, byte[]); 1161 method public android.bluetooth.le.AdvertiseData.Builder addServiceData(android.os.ParcelUuid, byte[]); 1162 method @NonNull public android.bluetooth.le.AdvertiseData.Builder addServiceSolicitationUuid(@NonNull android.os.ParcelUuid); 1163 method public android.bluetooth.le.AdvertiseData.Builder addServiceUuid(android.os.ParcelUuid); 1164 method @NonNull public android.bluetooth.le.AdvertiseData.Builder addTransportDiscoveryData(@NonNull android.bluetooth.le.TransportDiscoveryData); 1165 method public android.bluetooth.le.AdvertiseData build(); 1166 method public android.bluetooth.le.AdvertiseData.Builder setIncludeDeviceName(boolean); 1167 method public android.bluetooth.le.AdvertiseData.Builder setIncludeTxPowerLevel(boolean); 1168 } 1169 1170 public final class AdvertiseSettings implements android.os.Parcelable { 1171 method public int describeContents(); 1172 method public int getMode(); 1173 method public int getTimeout(); 1174 method public int getTxPowerLevel(); 1175 method public boolean isConnectable(); 1176 method public boolean isDiscoverable(); 1177 method public void writeToParcel(android.os.Parcel, int); 1178 field public static final int ADVERTISE_MODE_BALANCED = 1; // 0x1 1179 field public static final int ADVERTISE_MODE_LOW_LATENCY = 2; // 0x2 1180 field public static final int ADVERTISE_MODE_LOW_POWER = 0; // 0x0 1181 field public static final int ADVERTISE_TX_POWER_HIGH = 3; // 0x3 1182 field public static final int ADVERTISE_TX_POWER_LOW = 1; // 0x1 1183 field public static final int ADVERTISE_TX_POWER_MEDIUM = 2; // 0x2 1184 field public static final int ADVERTISE_TX_POWER_ULTRA_LOW = 0; // 0x0 1185 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertiseSettings> CREATOR; 1186 } 1187 1188 public static final class AdvertiseSettings.Builder { 1189 ctor public AdvertiseSettings.Builder(); 1190 method public android.bluetooth.le.AdvertiseSettings build(); 1191 method public android.bluetooth.le.AdvertiseSettings.Builder setAdvertiseMode(int); 1192 method public android.bluetooth.le.AdvertiseSettings.Builder setConnectable(boolean); 1193 method @NonNull public android.bluetooth.le.AdvertiseSettings.Builder setDiscoverable(boolean); 1194 method public android.bluetooth.le.AdvertiseSettings.Builder setTimeout(int); 1195 method public android.bluetooth.le.AdvertiseSettings.Builder setTxPowerLevel(int); 1196 } 1197 1198 public final class AdvertisingSet { 1199 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void enableAdvertising(boolean, int, int); 1200 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setAdvertisingData(android.bluetooth.le.AdvertiseData); 1201 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters); 1202 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setPeriodicAdvertisingData(android.bluetooth.le.AdvertiseData); 1203 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setPeriodicAdvertisingEnabled(boolean); 1204 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setPeriodicAdvertisingParameters(android.bluetooth.le.PeriodicAdvertisingParameters); 1205 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void setScanResponseData(android.bluetooth.le.AdvertiseData); 1206 } 1207 1208 public abstract class AdvertisingSetCallback { 1209 ctor public AdvertisingSetCallback(); 1210 method public void onAdvertisingDataSet(android.bluetooth.le.AdvertisingSet, int); 1211 method public void onAdvertisingEnabled(android.bluetooth.le.AdvertisingSet, boolean, int); 1212 method public void onAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet, int, int); 1213 method public void onAdvertisingSetStarted(android.bluetooth.le.AdvertisingSet, int, int); 1214 method public void onAdvertisingSetStopped(android.bluetooth.le.AdvertisingSet); 1215 method public void onPeriodicAdvertisingDataSet(android.bluetooth.le.AdvertisingSet, int); 1216 method public void onPeriodicAdvertisingEnabled(android.bluetooth.le.AdvertisingSet, boolean, int); 1217 method public void onPeriodicAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet, int); 1218 method public void onScanResponseDataSet(android.bluetooth.le.AdvertisingSet, int); 1219 field public static final int ADVERTISE_FAILED_ALREADY_STARTED = 3; // 0x3 1220 field public static final int ADVERTISE_FAILED_DATA_TOO_LARGE = 1; // 0x1 1221 field public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 5; // 0x5 1222 field public static final int ADVERTISE_FAILED_INTERNAL_ERROR = 4; // 0x4 1223 field public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS = 2; // 0x2 1224 field public static final int ADVERTISE_SUCCESS = 0; // 0x0 1225 } 1226 1227 public final class AdvertisingSetParameters implements android.os.Parcelable { 1228 method public int describeContents(); 1229 method public int getInterval(); 1230 method public int getPrimaryPhy(); 1231 method public int getSecondaryPhy(); 1232 method public int getTxPowerLevel(); 1233 method public boolean includeTxPower(); 1234 method public boolean isAnonymous(); 1235 method public boolean isConnectable(); 1236 method public boolean isDiscoverable(); 1237 method public boolean isLegacy(); 1238 method public boolean isScannable(); 1239 method public void writeToParcel(android.os.Parcel, int); 1240 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.AdvertisingSetParameters> CREATOR; 1241 field public static final int INTERVAL_HIGH = 1600; // 0x640 1242 field public static final int INTERVAL_LOW = 160; // 0xa0 1243 field public static final int INTERVAL_MAX = 16777215; // 0xffffff 1244 field public static final int INTERVAL_MEDIUM = 400; // 0x190 1245 field public static final int INTERVAL_MIN = 160; // 0xa0 1246 field public static final int TX_POWER_HIGH = 1; // 0x1 1247 field public static final int TX_POWER_LOW = -15; // 0xfffffff1 1248 field public static final int TX_POWER_MAX = 1; // 0x1 1249 field public static final int TX_POWER_MEDIUM = -7; // 0xfffffff9 1250 field public static final int TX_POWER_MIN = -127; // 0xffffff81 1251 field public static final int TX_POWER_ULTRA_LOW = -21; // 0xffffffeb 1252 } 1253 1254 public static final class AdvertisingSetParameters.Builder { 1255 ctor public AdvertisingSetParameters.Builder(); 1256 method public android.bluetooth.le.AdvertisingSetParameters build(); 1257 method public android.bluetooth.le.AdvertisingSetParameters.Builder setAnonymous(boolean); 1258 method public android.bluetooth.le.AdvertisingSetParameters.Builder setConnectable(boolean); 1259 method @NonNull public android.bluetooth.le.AdvertisingSetParameters.Builder setDiscoverable(boolean); 1260 method public android.bluetooth.le.AdvertisingSetParameters.Builder setIncludeTxPower(boolean); 1261 method public android.bluetooth.le.AdvertisingSetParameters.Builder setInterval(int); 1262 method public android.bluetooth.le.AdvertisingSetParameters.Builder setLegacyMode(boolean); 1263 method public android.bluetooth.le.AdvertisingSetParameters.Builder setPrimaryPhy(int); 1264 method public android.bluetooth.le.AdvertisingSetParameters.Builder setScannable(boolean); 1265 method public android.bluetooth.le.AdvertisingSetParameters.Builder setSecondaryPhy(int); 1266 method public android.bluetooth.le.AdvertisingSetParameters.Builder setTxPowerLevel(int); 1267 } 1268 1269 public final class BluetoothLeAdvertiser { 1270 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback); 1271 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); 1272 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); 1273 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); 1274 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); 1275 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); 1276 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void stopAdvertising(android.bluetooth.le.AdvertiseCallback); 1277 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE) public void stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback); 1278 } 1279 1280 public final class BluetoothLeScanner { 1281 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void flushPendingScanResults(android.bluetooth.le.ScanCallback); 1282 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void startScan(android.bluetooth.le.ScanCallback); 1283 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); 1284 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); 1285 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void stopScan(android.bluetooth.le.ScanCallback); 1286 method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void stopScan(android.app.PendingIntent); 1287 field public static final String EXTRA_CALLBACK_TYPE = "android.bluetooth.le.extra.CALLBACK_TYPE"; 1288 field public static final String EXTRA_ERROR_CODE = "android.bluetooth.le.extra.ERROR_CODE"; 1289 field public static final String EXTRA_LIST_SCAN_RESULT = "android.bluetooth.le.extra.LIST_SCAN_RESULT"; 1290 } 1291 1292 public final class PeriodicAdvertisingParameters implements android.os.Parcelable { 1293 method public int describeContents(); 1294 method public boolean getIncludeTxPower(); 1295 method public int getInterval(); 1296 method public void writeToParcel(android.os.Parcel, int); 1297 field public static final android.os.Parcelable.Creator<android.bluetooth.le.PeriodicAdvertisingParameters> CREATOR; 1298 } 1299 1300 public static final class PeriodicAdvertisingParameters.Builder { 1301 ctor public PeriodicAdvertisingParameters.Builder(); 1302 method public android.bluetooth.le.PeriodicAdvertisingParameters build(); 1303 method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean); 1304 method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int); 1305 } 1306 1307 public abstract class ScanCallback { 1308 ctor public ScanCallback(); 1309 method public void onBatchScanResults(java.util.List<android.bluetooth.le.ScanResult>); 1310 method public void onScanFailed(int); 1311 method public void onScanResult(int, android.bluetooth.le.ScanResult); 1312 field public static final int SCAN_FAILED_ALREADY_STARTED = 1; // 0x1 1313 field public static final int SCAN_FAILED_APPLICATION_REGISTRATION_FAILED = 2; // 0x2 1314 field public static final int SCAN_FAILED_FEATURE_UNSUPPORTED = 4; // 0x4 1315 field public static final int SCAN_FAILED_INTERNAL_ERROR = 3; // 0x3 1316 field public static final int SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES = 5; // 0x5 1317 field public static final int SCAN_FAILED_SCANNING_TOO_FREQUENTLY = 6; // 0x6 1318 } 1319 1320 public final class ScanFilter implements android.os.Parcelable { 1321 method public int describeContents(); 1322 method @Nullable public byte[] getAdvertisingData(); 1323 method @Nullable public byte[] getAdvertisingDataMask(); 1324 method public int getAdvertisingDataType(); 1325 method @Nullable public String getDeviceAddress(); 1326 method @Nullable public String getDeviceName(); 1327 method @Nullable public byte[] getManufacturerData(); 1328 method @Nullable public byte[] getManufacturerDataMask(); 1329 method public int getManufacturerId(); 1330 method @Nullable public byte[] getServiceData(); 1331 method @Nullable public byte[] getServiceDataMask(); 1332 method @Nullable public android.os.ParcelUuid getServiceDataUuid(); 1333 method @Nullable public android.os.ParcelUuid getServiceSolicitationUuid(); 1334 method @Nullable public android.os.ParcelUuid getServiceSolicitationUuidMask(); 1335 method @Nullable public android.os.ParcelUuid getServiceUuid(); 1336 method @Nullable public android.os.ParcelUuid getServiceUuidMask(); 1337 method public boolean matches(android.bluetooth.le.ScanResult); 1338 method public void writeToParcel(android.os.Parcel, int); 1339 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanFilter> CREATOR; 1340 } 1341 1342 public static final class ScanFilter.Builder { 1343 ctor public ScanFilter.Builder(); 1344 method public android.bluetooth.le.ScanFilter build(); 1345 method @NonNull public android.bluetooth.le.ScanFilter.Builder setAdvertisingDataType(int); 1346 method @NonNull public android.bluetooth.le.ScanFilter.Builder setAdvertisingDataTypeWithData(int, @NonNull byte[], @NonNull byte[]); 1347 method public android.bluetooth.le.ScanFilter.Builder setDeviceAddress(String); 1348 method public android.bluetooth.le.ScanFilter.Builder setDeviceName(String); 1349 method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[]); 1350 method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[], byte[]); 1351 method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[]); 1352 method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[], byte[]); 1353 method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid); 1354 method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid, @Nullable android.os.ParcelUuid); 1355 method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid); 1356 method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid); 1357 } 1358 1359 public final class ScanRecord { 1360 method public int getAdvertiseFlags(); 1361 method @NonNull public java.util.Map<java.lang.Integer,byte[]> getAdvertisingDataMap(); 1362 method public byte[] getBytes(); 1363 method @Nullable public String getDeviceName(); 1364 method public android.util.SparseArray<byte[]> getManufacturerSpecificData(); 1365 method @Nullable public byte[] getManufacturerSpecificData(int); 1366 method public java.util.Map<android.os.ParcelUuid,byte[]> getServiceData(); 1367 method @Nullable public byte[] getServiceData(android.os.ParcelUuid); 1368 method @NonNull public java.util.List<android.os.ParcelUuid> getServiceSolicitationUuids(); 1369 method public java.util.List<android.os.ParcelUuid> getServiceUuids(); 1370 method public int getTxPowerLevel(); 1371 field public static final int DATA_TYPE_3D_INFORMATION_DATA = 61; // 0x3d 1372 field public static final int DATA_TYPE_ADVERTISING_INTERVAL = 26; // 0x1a 1373 field public static final int DATA_TYPE_ADVERTISING_INTERVAL_LONG = 47; // 0x2f 1374 field public static final int DATA_TYPE_APPEARANCE = 25; // 0x19 1375 field public static final int DATA_TYPE_BIG_INFO = 44; // 0x2c 1376 field public static final int DATA_TYPE_BROADCAST_CODE = 45; // 0x2d 1377 field public static final int DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION = 40; // 0x28 1378 field public static final int DATA_TYPE_CLASS_OF_DEVICE = 13; // 0xd 1379 field public static final int DATA_TYPE_DEVICE_ID = 16; // 0x10 1380 field public static final int DATA_TYPE_FLAGS = 1; // 0x1 1381 field public static final int DATA_TYPE_INDOOR_POSITIONING = 37; // 0x25 1382 field public static final int DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS = 27; // 0x1b 1383 field public static final int DATA_TYPE_LE_ROLE = 28; // 0x1c 1384 field public static final int DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE = 34; // 0x22 1385 field public static final int DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE = 35; // 0x23 1386 field public static final int DATA_TYPE_LE_SUPPORTED_FEATURES = 39; // 0x27 1387 field public static final int DATA_TYPE_LOCAL_NAME_COMPLETE = 9; // 0x9 1388 field public static final int DATA_TYPE_LOCAL_NAME_SHORT = 8; // 0x8 1389 field public static final int DATA_TYPE_MANUFACTURER_SPECIFIC_DATA = 255; // 0xff 1390 field public static final int DATA_TYPE_MESH_BEACON = 43; // 0x2b 1391 field public static final int DATA_TYPE_MESH_MESSAGE = 42; // 0x2a 1392 field public static final int DATA_TYPE_NONE = -1; // 0xffffffff 1393 field public static final int DATA_TYPE_PB_ADV = 41; // 0x29 1394 field public static final int DATA_TYPE_PUBLIC_TARGET_ADDRESS = 23; // 0x17 1395 field public static final int DATA_TYPE_RANDOM_TARGET_ADDRESS = 24; // 0x18 1396 field public static final int DATA_TYPE_RESOLVABLE_SET_IDENTIFIER = 46; // 0x2e 1397 field public static final int DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS = 17; // 0x11 1398 field public static final int DATA_TYPE_SERVICE_DATA_128_BIT = 33; // 0x21 1399 field public static final int DATA_TYPE_SERVICE_DATA_16_BIT = 22; // 0x16 1400 field public static final int DATA_TYPE_SERVICE_DATA_32_BIT = 32; // 0x20 1401 field public static final int DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT = 21; // 0x15 1402 field public static final int DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT = 20; // 0x14 1403 field public static final int DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT = 31; // 0x1f 1404 field public static final int DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE = 7; // 0x7 1405 field public static final int DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL = 6; // 0x6 1406 field public static final int DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE = 3; // 0x3 1407 field public static final int DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL = 2; // 0x2 1408 field public static final int DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE = 5; // 0x5 1409 field public static final int DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL = 4; // 0x4 1410 field public static final int DATA_TYPE_SIMPLE_PAIRING_HASH_C = 14; // 0xe 1411 field public static final int DATA_TYPE_SIMPLE_PAIRING_HASH_C_256 = 29; // 0x1d 1412 field public static final int DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R = 15; // 0xf 1413 field public static final int DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256 = 30; // 0x1e 1414 field public static final int DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE = 18; // 0x12 1415 field public static final int DATA_TYPE_TRANSPORT_DISCOVERY_DATA = 38; // 0x26 1416 field public static final int DATA_TYPE_TX_POWER_LEVEL = 10; // 0xa 1417 field public static final int DATA_TYPE_URI = 36; // 0x24 1418 } 1419 1420 public final class ScanResult implements android.os.Parcelable { 1421 ctor @Deprecated public ScanResult(android.bluetooth.BluetoothDevice, android.bluetooth.le.ScanRecord, int, long); 1422 ctor public ScanResult(android.bluetooth.BluetoothDevice, int, int, int, int, int, int, int, android.bluetooth.le.ScanRecord, long); 1423 method public int describeContents(); 1424 method public int getAdvertisingSid(); 1425 method public int getDataStatus(); 1426 method public android.bluetooth.BluetoothDevice getDevice(); 1427 method public int getPeriodicAdvertisingInterval(); 1428 method public int getPrimaryPhy(); 1429 method public int getRssi(); 1430 method @Nullable public android.bluetooth.le.ScanRecord getScanRecord(); 1431 method public int getSecondaryPhy(); 1432 method public long getTimestampNanos(); 1433 method public int getTxPower(); 1434 method public boolean isConnectable(); 1435 method public boolean isLegacy(); 1436 method public void writeToParcel(android.os.Parcel, int); 1437 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanResult> CREATOR; 1438 field public static final int DATA_COMPLETE = 0; // 0x0 1439 field public static final int DATA_TRUNCATED = 2; // 0x2 1440 field public static final int PERIODIC_INTERVAL_NOT_PRESENT = 0; // 0x0 1441 field public static final int PHY_UNUSED = 0; // 0x0 1442 field public static final int SID_NOT_PRESENT = 255; // 0xff 1443 field public static final int TX_POWER_NOT_PRESENT = 127; // 0x7f 1444 } 1445 1446 public final class ScanSettings implements android.os.Parcelable { 1447 method public int describeContents(); 1448 method public int getCallbackType(); 1449 method public boolean getLegacy(); 1450 method public int getPhy(); 1451 method public long getReportDelayMillis(); 1452 method public int getScanMode(); 1453 method public int getScanResultType(); 1454 method public void writeToParcel(android.os.Parcel, int); 1455 field public static final long AUTO_BATCH_MIN_REPORT_DELAY_MILLIS = 600000L; // 0x927c0L 1456 field public static final int CALLBACK_TYPE_ALL_MATCHES = 1; // 0x1 1457 field public static final int CALLBACK_TYPE_ALL_MATCHES_AUTO_BATCH = 8; // 0x8 1458 field public static final int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2 1459 field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4 1460 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR; 1461 field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1 1462 field public static final int MATCH_MODE_STICKY = 2; // 0x2 1463 field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2 1464 field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3 1465 field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1 1466 field public static final int PHY_LE_ALL_SUPPORTED = 255; // 0xff 1467 field public static final int SCAN_MODE_BALANCED = 1; // 0x1 1468 field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 1469 field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 1470 field public static final int SCAN_MODE_OPPORTUNISTIC = -1; // 0xffffffff 1471 } 1472 1473 public static final class ScanSettings.Builder { 1474 ctor public ScanSettings.Builder(); 1475 method public android.bluetooth.le.ScanSettings build(); 1476 method public android.bluetooth.le.ScanSettings.Builder setCallbackType(int); 1477 method public android.bluetooth.le.ScanSettings.Builder setLegacy(boolean); 1478 method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int); 1479 method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int); 1480 method public android.bluetooth.le.ScanSettings.Builder setPhy(int); 1481 method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long); 1482 method public android.bluetooth.le.ScanSettings.Builder setScanMode(int); 1483 } 1484 1485 public final class TransportBlock implements android.os.Parcelable { 1486 ctor public TransportBlock(int, int, int, @Nullable byte[]); 1487 method public int describeContents(); 1488 method public int getOrgId(); 1489 method public int getTdsFlags(); 1490 method @Nullable public byte[] getTransportData(); 1491 method public int getTransportDataLength(); 1492 method @Nullable public byte[] toByteArray(); 1493 method public int totalBytes(); 1494 method public void writeToParcel(@NonNull android.os.Parcel, int); 1495 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.TransportBlock> CREATOR; 1496 } 1497 1498 public final class TransportDiscoveryData implements android.os.Parcelable { 1499 ctor public TransportDiscoveryData(int, @NonNull java.util.List<android.bluetooth.le.TransportBlock>); 1500 ctor public TransportDiscoveryData(@NonNull byte[]); 1501 method public int describeContents(); 1502 method @NonNull public java.util.List<android.bluetooth.le.TransportBlock> getTransportBlocks(); 1503 method public int getTransportDataType(); 1504 method @Nullable public byte[] toByteArray(); 1505 method public int totalBytes(); 1506 method public void writeToParcel(@NonNull android.os.Parcel, int); 1507 field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.TransportDiscoveryData> CREATOR; 1508 } 1509 1510} 1511 1512