Class CoreBluetooth


  • public final class CoreBluetooth
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.lang.String CBAdvertisementDataIsConnectable()
      [@constant] CBAdvertisementDataIsConnectable An NSNumber (Boolean) indicating whether or not the advertising event type was connectable.
      static @NotNull java.lang.String CBAdvertisementDataLocalNameKey()
      [@constant] CBAdvertisementDataLocalNameKey A NSString containing the local name of a peripheral.
      static @NotNull java.lang.String CBAdvertisementDataManufacturerDataKey()
      [@constant] CBAdvertisementDataManufacturerDataKey A NSData object containing the manufacturer data of a peripheral.
      static @NotNull java.lang.String CBAdvertisementDataOverflowServiceUUIDsKey()
      [@constant] CBAdvertisementDataOverflowServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs that were found in the "overflow" area of the advertising data.
      static @NotNull java.lang.String CBAdvertisementDataServiceDataKey()
      [@constant] CBAdvertisementDataServiceDataKey A dictionary containing service-specific advertisement data.
      static @NotNull java.lang.String CBAdvertisementDataServiceUUIDsKey()
      [@constant] CBAdvertisementDataServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs.
      static @NotNull java.lang.String CBAdvertisementDataSolicitedServiceUUIDsKey()
      [@constant] CBAdvertisementDataSolicitedServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs.
      static @NotNull java.lang.String CBAdvertisementDataTxPowerLevelKey()
      [@constant] CBAdvertisementDataTxPowerLevelKey A NSNumber containing the transmit power of a peripheral.
      static @NotNull java.lang.String CBATTErrorDomain()  
      static @NotNull java.lang.String CBCentralManagerOptionDeviceAccessForMedia()
      [@const] CBCentralManagerOptionDeviceAccessForMedia A Boolean representing the CBCentralManager init purpose is for DeviceAccess for media only.
      static @NotNull java.lang.String CBCentralManagerOptionRestoreIdentifierKey()
      [@const] CBCentralManagerOptionRestoreIdentifierKey An NSString containing a unique identifier (UID) for the CBCentralManager that is being instantiated.
      static @NotNull java.lang.String CBCentralManagerOptionShowPowerAlertKey()
      [@const] CBCentralManagerOptionShowPowerAlertKey An NSNumber (Boolean) indicating that the system should, if Bluetooth is powered off when CBCentralManager is instantiated, display a warning dialog to the user.
      static @NotNull java.lang.String CBCentralManagerRestoredStatePeripheralsKey()
      [@const] CBCentralManagerRestoredStatePeripheralsKey An NSArray of CBPeripheral objects containing all peripherals that were connected or pending connection at the time the application was terminated by the system.
      static @NotNull java.lang.String CBCentralManagerRestoredStateScanOptionsKey()
      [@const] CBCentralManagerRestoredStateScanOptionsKey An NSDictionary containing the scan options at the time the application was terminated by the system.
      static @NotNull java.lang.String CBCentralManagerRestoredStateScanServicesKey()
      [@const] CBCentralManagerRestoredStateScanServicesKey An NSArray of CBUUID objects containing the service(s) being scanned for at the time the application was terminated by the system.
      static @NotNull java.lang.String CBCentralManagerScanOptionAllowDuplicatesKey()
      [@const] CBCentralManagerScanOptionAllowDuplicatesKey An NSNumber (Boolean) indicating that the scan should run without duplicate filtering.
      static @NotNull java.lang.String CBCentralManagerScanOptionSolicitedServiceUUIDsKey()
      [@const] CBCentralManagerScanOptionSolicitedServiceUUIDsKey An NSArray of CBUUID objects respresenting service UUIDs.
      static @NotNull java.lang.String CBConnectionEventMatchingOptionPeripheralUUIDs()
      [@const] CBConnectionEventMatchingOptionPeripheralUUIDs An NSArray of NSUUID objects respresenting peripheral identifiers.
      static @NotNull java.lang.String CBConnectionEventMatchingOptionServiceUUIDs()
      [@const] CBConnectionEventMatchingOptionServiceUUIDs An NSArray of CBUUID objects respresenting service UUIDs.
      static @NotNull java.lang.String CBConnectPeripheralOptionEnableAutoReconnect()
      [@const] CBConnectPeripheralOptionEnableAutoReconnect An NSNumber (Boolean) indicating that the AutoReconnect is enabled for the peripheral is connected.
      static @NotNull java.lang.String CBConnectPeripheralOptionEnableTransportBridgingKey()
      [@const] CBConnectPeripheralOptionEnableTransportBridgingKey An NSNumber (Boolean) indicating that the system will bring up classic transport profiles when low energy transport for peripheral is connected.
      static @NotNull java.lang.String CBConnectPeripheralOptionNotifyOnConnectionKey()
      [@const] CBConnectPeripheralOptionNotifyOnConnectionKey An NSNumber (Boolean) indicating that the system should display a connection alert for a given peripheral, if the application is suspended when a successful connection is made.
      static @NotNull java.lang.String CBConnectPeripheralOptionNotifyOnDisconnectionKey()
      [@const] CBConnectPeripheralOptionNotifyOnDisconnectionKey An NSNumber (Boolean) indicating that the system should display a disconnection alert for a given peripheral, if the application is suspended at the time of the disconnection.
      static @NotNull java.lang.String CBConnectPeripheralOptionNotifyOnNotificationKey()
      [@const] CBConnectPeripheralOptionNotifyOnNotificationKey An NSNumber (Boolean) indicating that the system should display an alert for all notifications received from a given peripheral, if the application is suspended at the time.
      static @NotNull java.lang.String CBConnectPeripheralOptionRequiresANCS()
      [@const] CBConnectPeripheralOptionRequiresANCS An NSNumber (Boolean) indicating that the ANCS (Apple Notification Center Service) is required for the peripheral is connected.
      static @NotNull java.lang.String CBConnectPeripheralOptionStartDelayKey()
      [@const] CBConnectPeripheralOptionStartDelayKey An NSNumber indicating the number of seconds for the system to wait before starting a connection.
      static @NotNull java.lang.String CBErrorDomain()  
      static @NotNull java.lang.String CBPeripheralManagerOptionRestoreIdentifierKey()
      [@const] CBPeripheralManagerOptionRestoreIdentifierKey An NSString containing a unique identifier (UID) for the CBPeripheralManager that is being instantiated.
      static @NotNull java.lang.String CBPeripheralManagerOptionShowPowerAlertKey()
      [@const] CBPeripheralManagerOptionShowPowerAlertKey An NSNumber (Boolean) indicating that the system should, if Bluetooth is powered off when CBPeripheralManager is instantiated, display a warning dialog to the user.
      static @NotNull java.lang.String CBPeripheralManagerRestoredStateAdvertisementDataKey()
      [@const] CBPeripheralManagerRestoredStateAdvertisementDataKey An NSDictionary containing the data being advertised at the time the application was terminated by the system.
      static @NotNull java.lang.String CBPeripheralManagerRestoredStateServicesKey()
      [@const] CBPeripheralManagerRestoredStateServicesKey An NSArray of CBMutableService objects containing all services that were published to the local database at the time the application was terminated by the system.
      static @NotNull java.lang.String CBUUIDCharacteristicAggregateFormatString()
      [@const] CBUUIDCharacteristicAggregateFormatString The string representation of the UUID for the aggregate descriptor.
      static @NotNull java.lang.String CBUUIDCharacteristicExtendedPropertiesString()
      [@const] CBUUIDCharacteristicExtendedPropertiesString The string representation of the UUID for the extended properties descriptor.
      static @NotNull java.lang.String CBUUIDCharacteristicFormatString()
      [@const] CBUUIDCharacteristicFormatString The string representation of the UUID for the presentation format descriptor.
      static @NotNull java.lang.String CBUUIDCharacteristicUserDescriptionString()
      [@const] CBUUIDCharacteristicUserDescriptionString The string representation of the UUID for the user description descriptor.
      static @NotNull java.lang.String CBUUIDCharacteristicValidRangeString()
      [@const] CBUUIDCharacteristicValidRangeString Data representing the valid min/max values accepted for a characteristic.
      static @NotNull java.lang.String CBUUIDClientCharacteristicConfigurationString()
      [@const] CBUUIDClientCharacteristicConfigurationString The string representation of the UUID for the client configuration descriptor.
      static @NotNull java.lang.String CBUUIDL2CAPPSMCharacteristicString()
      [@const] CBUUIDL2CAPPSMCharacteristicString The PSM (a little endian uint16_t) of an L2CAP Channel associated with the GATT service containing this characteristic.
      static @NotNull java.lang.String CBUUIDServerCharacteristicConfigurationString()
      [@const] CBUUIDServerCharacteristicConfigurationString The string representation of the UUID for the server configuration descriptor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • CBAdvertisementDataLocalNameKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataLocalNameKey()
        [@constant] CBAdvertisementDataLocalNameKey A NSString containing the local name of a peripheral.
      • CBAdvertisementDataTxPowerLevelKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataTxPowerLevelKey()
        [@constant] CBAdvertisementDataTxPowerLevelKey A NSNumber containing the transmit power of a peripheral.
      • CBAdvertisementDataServiceUUIDsKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataServiceUUIDsKey()
        [@constant] CBAdvertisementDataServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs.
      • CBAdvertisementDataServiceDataKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataServiceDataKey()
        [@constant] CBAdvertisementDataServiceDataKey A dictionary containing service-specific advertisement data. Keys are CBUUID objects, representing CBService UUIDs. Values are NSData objects.
      • CBAdvertisementDataManufacturerDataKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataManufacturerDataKey()
        [@constant] CBAdvertisementDataManufacturerDataKey A NSData object containing the manufacturer data of a peripheral.
      • CBAdvertisementDataOverflowServiceUUIDsKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataOverflowServiceUUIDsKey()
        [@constant] CBAdvertisementDataOverflowServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs that were found in the "overflow" area of the advertising data. Due to the nature of the data stored in this area, UUIDs listed here are "best effort" and may not always be accurate.
      • CBAdvertisementDataIsConnectable

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataIsConnectable()
        [@constant] CBAdvertisementDataIsConnectable An NSNumber (Boolean) indicating whether or not the advertising event type was connectable. This can be used to determine whether or not a peripheral is connectable in that instant. API-Since: 7.0
      • CBAdvertisementDataSolicitedServiceUUIDsKey

        @NotNull
        public static @NotNull java.lang.String CBAdvertisementDataSolicitedServiceUUIDsKey()
        [@constant] CBAdvertisementDataSolicitedServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs. API-Since: 7.0
      • CBCentralManagerOptionShowPowerAlertKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerOptionShowPowerAlertKey()
        [@const] CBCentralManagerOptionShowPowerAlertKey An NSNumber (Boolean) indicating that the system should, if Bluetooth is powered off when CBCentralManager is instantiated, display a warning dialog to the user.
      • CBCentralManagerOptionRestoreIdentifierKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerOptionRestoreIdentifierKey()
        [@const] CBCentralManagerOptionRestoreIdentifierKey An NSString containing a unique identifier (UID) for the CBCentralManager that is being instantiated. This UID is used by the system to identify a specific CBCentralManager instance for restoration and, therefore, must remain the same for subsequent application executions in order for the manager to be restored.
      • CBCentralManagerScanOptionAllowDuplicatesKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerScanOptionAllowDuplicatesKey()
        [@const] CBCentralManagerScanOptionAllowDuplicatesKey An NSNumber (Boolean) indicating that the scan should run without duplicate filtering. By default, multiple discoveries of the same peripheral are coalesced into a single discovery event. Specifying this option will cause a discovery event to be generated every time the peripheral is seen, which may be many times per second. This can be useful in specific situations, such as making a connection based on a peripheral's RSSI, but may have an adverse affect on battery-life and application performance.
      • CBCentralManagerScanOptionSolicitedServiceUUIDsKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerScanOptionSolicitedServiceUUIDsKey()
        [@const] CBCentralManagerScanOptionSolicitedServiceUUIDsKey An NSArray of CBUUID objects respresenting service UUIDs. Causes the scan to also look for peripherals soliciting any of the services contained in the list.
      • CBConnectPeripheralOptionNotifyOnConnectionKey

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionNotifyOnConnectionKey()
        [@const] CBConnectPeripheralOptionNotifyOnConnectionKey An NSNumber (Boolean) indicating that the system should display a connection alert for a given peripheral, if the application is suspended when a successful connection is made. This is useful for applications that have not specified the bluetooth-central background mode and cannot display their own alert. If more than one application has requested notification for a given peripheral, the one that was most recently in the foreground will receive the alert.
      • CBConnectPeripheralOptionNotifyOnDisconnectionKey

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionNotifyOnDisconnectionKey()
        [@const] CBConnectPeripheralOptionNotifyOnDisconnectionKey An NSNumber (Boolean) indicating that the system should display a disconnection alert for a given peripheral, if the application is suspended at the time of the disconnection. This is useful for applications that have not specified the bluetooth-central background mode and cannot display their own alert. If more than one application has requested notification for a given peripheral, the one that was most recently in the foreground will receive the alert.
      • CBConnectPeripheralOptionNotifyOnNotificationKey

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionNotifyOnNotificationKey()
        [@const] CBConnectPeripheralOptionNotifyOnNotificationKey An NSNumber (Boolean) indicating that the system should display an alert for all notifications received from a given peripheral, if the application is suspended at the time. This is useful for applications that have not specified the bluetooth-central background mode and cannot display their own alert. If more than one application has requested notification for a given peripheral, the one that was most recently in the foreground will receive the alert.
      • CBCentralManagerRestoredStatePeripheralsKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerRestoredStatePeripheralsKey()
        [@const] CBCentralManagerRestoredStatePeripheralsKey An NSArray of CBPeripheral objects containing all peripherals that were connected or pending connection at the time the application was terminated by the system. When possible, all known information for each peripheral will be restored, including any discovered services, characteristics and descriptors, as well as characteristic notification states.
      • CBCentralManagerRestoredStateScanServicesKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerRestoredStateScanServicesKey()
        [@const] CBCentralManagerRestoredStateScanServicesKey An NSArray of CBUUID objects containing the service(s) being scanned for at the time the application was terminated by the system.
      • CBCentralManagerRestoredStateScanOptionsKey

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerRestoredStateScanOptionsKey()
        [@const] CBCentralManagerRestoredStateScanOptionsKey An NSDictionary containing the scan options at the time the application was terminated by the system.
      • CBErrorDomain

        @NotNull
        public static @NotNull java.lang.String CBErrorDomain()
      • CBATTErrorDomain

        @NotNull
        public static @NotNull java.lang.String CBATTErrorDomain()
      • CBPeripheralManagerOptionShowPowerAlertKey

        @NotNull
        public static @NotNull java.lang.String CBPeripheralManagerOptionShowPowerAlertKey()
        [@const] CBPeripheralManagerOptionShowPowerAlertKey An NSNumber (Boolean) indicating that the system should, if Bluetooth is powered off when CBPeripheralManager is instantiated, display a warning dialog to the user.
      • CBPeripheralManagerOptionRestoreIdentifierKey

        @NotNull
        public static @NotNull java.lang.String CBPeripheralManagerOptionRestoreIdentifierKey()
        [@const] CBPeripheralManagerOptionRestoreIdentifierKey An NSString containing a unique identifier (UID) for the CBPeripheralManager that is being instantiated. This UID is used by the system to identify a specific CBPeripheralManager instance for restoration and, therefore, must remain the same for subsequent application executions in order for the manager to be restored.
      • CBPeripheralManagerRestoredStateServicesKey

        @NotNull
        public static @NotNull java.lang.String CBPeripheralManagerRestoredStateServicesKey()
        [@const] CBPeripheralManagerRestoredStateServicesKey An NSArray of CBMutableService objects containing all services that were published to the local database at the time the application was terminated by the system. All information for each service will be restored, including all discovered services, characteristics and descriptors, as well as characteristic notification states.
      • CBPeripheralManagerRestoredStateAdvertisementDataKey

        @NotNull
        public static @NotNull java.lang.String CBPeripheralManagerRestoredStateAdvertisementDataKey()
        [@const] CBPeripheralManagerRestoredStateAdvertisementDataKey An NSDictionary containing the data being advertised at the time the application was terminated by the system.
      • CBUUIDCharacteristicExtendedPropertiesString

        @NotNull
        public static @NotNull java.lang.String CBUUIDCharacteristicExtendedPropertiesString()
        [@const] CBUUIDCharacteristicExtendedPropertiesString The string representation of the UUID for the extended properties descriptor. The corresponding value for this descriptor is an NSNumber object.
      • CBUUIDCharacteristicUserDescriptionString

        @NotNull
        public static @NotNull java.lang.String CBUUIDCharacteristicUserDescriptionString()
        [@const] CBUUIDCharacteristicUserDescriptionString The string representation of the UUID for the user description descriptor. The corresponding value for this descriptor is an NSString object.
      • CBUUIDClientCharacteristicConfigurationString

        @NotNull
        public static @NotNull java.lang.String CBUUIDClientCharacteristicConfigurationString()
        [@const] CBUUIDClientCharacteristicConfigurationString The string representation of the UUID for the client configuration descriptor. The corresponding value for this descriptor is an NSNumber object.
      • CBUUIDServerCharacteristicConfigurationString

        @NotNull
        public static @NotNull java.lang.String CBUUIDServerCharacteristicConfigurationString()
        [@const] CBUUIDServerCharacteristicConfigurationString The string representation of the UUID for the server configuration descriptor. The corresponding value for this descriptor is an NSNumber object.
      • CBUUIDCharacteristicFormatString

        @NotNull
        public static @NotNull java.lang.String CBUUIDCharacteristicFormatString()
        [@const] CBUUIDCharacteristicFormatString The string representation of the UUID for the presentation format descriptor. The corresponding value for this descriptor is an NSData object.
      • CBUUIDCharacteristicAggregateFormatString

        @NotNull
        public static @NotNull java.lang.String CBUUIDCharacteristicAggregateFormatString()
        [@const] CBUUIDCharacteristicAggregateFormatString The string representation of the UUID for the aggregate descriptor.
      • CBUUIDCharacteristicValidRangeString

        @NotNull
        public static @NotNull java.lang.String CBUUIDCharacteristicValidRangeString()
        [@const] CBUUIDCharacteristicValidRangeString Data representing the valid min/max values accepted for a characteristic.
      • CBUUIDL2CAPPSMCharacteristicString

        @NotNull
        public static @NotNull java.lang.String CBUUIDL2CAPPSMCharacteristicString()
        [@const] CBUUIDL2CAPPSMCharacteristicString The PSM (a little endian uint16_t) of an L2CAP Channel associated with the GATT service containing this characteristic. Servers can publish this characteristic with the UUID ABDD3056-28FA-441D-A470-55A75A52553A API-Since: 11.0
      • CBConnectPeripheralOptionStartDelayKey

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionStartDelayKey()
        [@const] CBConnectPeripheralOptionStartDelayKey An NSNumber indicating the number of seconds for the system to wait before starting a connection.
      • CBConnectPeripheralOptionEnableTransportBridgingKey

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionEnableTransportBridgingKey()
        [@const] CBConnectPeripheralOptionEnableTransportBridgingKey An NSNumber (Boolean) indicating that the system will bring up classic transport profiles when low energy transport for peripheral is connected.
      • CBConnectPeripheralOptionRequiresANCS

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionRequiresANCS()
        [@const] CBConnectPeripheralOptionRequiresANCS An NSNumber (Boolean) indicating that the ANCS (Apple Notification Center Service) is required for the peripheral is connected.
      • CBConnectionEventMatchingOptionServiceUUIDs

        @NotNull
        public static @NotNull java.lang.String CBConnectionEventMatchingOptionServiceUUIDs()
        [@const] CBConnectionEventMatchingOptionServiceUUIDs An NSArray of CBUUID objects respresenting service UUIDs. A connected peer with any matching service UUIDs will result in a call to {@link centralManager:connectionEventDidOccur:}. A maximum of 4 services can be registered.
      • CBConnectionEventMatchingOptionPeripheralUUIDs

        @NotNull
        public static @NotNull java.lang.String CBConnectionEventMatchingOptionPeripheralUUIDs()
        [@const] CBConnectionEventMatchingOptionPeripheralUUIDs An NSArray of NSUUID objects respresenting peripheral identifiers. A connected peer with any matching identifier(s) will result in a call to {@link centralManager:connectionEventDidOccur:}.
      • CBCentralManagerOptionDeviceAccessForMedia

        @NotNull
        public static @NotNull java.lang.String CBCentralManagerOptionDeviceAccessForMedia()
        [@const] CBCentralManagerOptionDeviceAccessForMedia A Boolean representing the CBCentralManager init purpose is for DeviceAccess for media only. This will limit the functionality of this manager and only allow media device access without prompting the user for Bluetooth generic TCC.
      • CBConnectPeripheralOptionEnableAutoReconnect

        @NotNull
        public static @NotNull java.lang.String CBConnectPeripheralOptionEnableAutoReconnect()
        [@const] CBConnectPeripheralOptionEnableAutoReconnect An NSNumber (Boolean) indicating that the AutoReconnect is enabled for the peripheral is connected. After peripheral device is connected, this will allow the system to initiate connect to the peer device automatically when link is dropped. Caller will get notified about the disconnection with potential delay via {@link centralManager:didDisconnectPeripheral:timestamp:isReconnecting:error:}