Class CoreBluetooth


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String CBAdvertisementDataIsConnectable()
      [@constant] CBAdvertisementDataIsConnectable An NSNumber (Boolean) indicating whether or not the advertising event type was connectable.
      static java.lang.String CBAdvertisementDataLocalNameKey()
      [@constant] CBAdvertisementDataLocalNameKey A NSString containing the local name of a peripheral.
      static java.lang.String CBAdvertisementDataManufacturerDataKey()
      [@constant] CBAdvertisementDataManufacturerDataKey A NSData object containing the manufacturer data of a peripheral.
      static 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 java.lang.String CBAdvertisementDataServiceDataKey()
      [@constant] CBAdvertisementDataServiceDataKey A dictionary containing service-specific advertisement data.
      static java.lang.String CBAdvertisementDataServiceUUIDsKey()
      [@constant] CBAdvertisementDataServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs.
      static java.lang.String CBAdvertisementDataSolicitedServiceUUIDsKey()
      [@constant] CBAdvertisementDataSolicitedServiceUUIDsKey A list of one or more CBUUID objects, representing CBService UUIDs.
      static java.lang.String CBAdvertisementDataTxPowerLevelKey()
      [@constant] CBAdvertisementDataTxPowerLevelKey A NSNumber containing the transmit power of a peripheral.
      static java.lang.String CBATTErrorDomain()  
      static java.lang.String CBCentralManagerOptionRestoreIdentifierKey()
      [@const] CBCentralManagerOptionRestoreIdentifierKey An NSString containing a unique identifier (UID) for the CBCentralManager that is being instantiated.
      static 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 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 java.lang.String CBCentralManagerRestoredStateScanOptionsKey()
      [@const] CBCentralManagerRestoredStateScanOptionsKey An NSDictionary containing the scan options at the time the application was terminated by the system.
      static 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 java.lang.String CBCentralManagerScanOptionAllowDuplicatesKey()
      [@const] CBCentralManagerScanOptionAllowDuplicatesKey An NSNumber (Boolean) indicating that the scan should run without duplicate filtering.
      static java.lang.String CBCentralManagerScanOptionSolicitedServiceUUIDsKey()
      [@const] CBCentralManagerScanOptionSolicitedServiceUUIDsKey An NSArray of CBUUID objects respresenting service UUIDs.
      static java.lang.String CBConnectionEventMatchingOptionPeripheralUUIDs()
      [@const] CBConnectionEventMatchingOptionPeripheralUUIDs An NSArray of NSUUID objects respresenting peripheral identifiers.
      static java.lang.String CBConnectionEventMatchingOptionServiceUUIDs()
      [@const] CBConnectionEventMatchingOptionServiceUUIDs An NSArray of CBUUID objects respresenting service UUIDs.
      static 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 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 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 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 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 java.lang.String CBConnectPeripheralOptionStartDelayKey()
      [@const] CBConnectPeripheralOptionStartDelayKey An NSNumber indicating the number of seconds for the system to wait before starting a connection.
      static java.lang.String CBErrorDomain()  
      static java.lang.String CBPeripheralManagerOptionRestoreIdentifierKey()
      [@const] CBPeripheralManagerOptionRestoreIdentifierKey An NSString containing a unique identifier (UID) for the CBPeripheralManager that is being instantiated.
      static 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 java.lang.String CBPeripheralManagerRestoredStateAdvertisementDataKey()
      [@const] CBPeripheralManagerRestoredStateAdvertisementDataKey An NSDictionary containing the data being advertised at the time the application was terminated by the system.
      static 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 java.lang.String CBUUIDCharacteristicAggregateFormatString()
      [@const] CBUUIDCharacteristicAggregateFormatString The string representation of the UUID for the aggregate descriptor.
      static java.lang.String CBUUIDCharacteristicExtendedPropertiesString()
      [@const] CBUUIDCharacteristicExtendedPropertiesString The string representation of the UUID for the extended properties descriptor.
      static java.lang.String CBUUIDCharacteristicFormatString()
      [@const] CBUUIDCharacteristicFormatString The string representation of the UUID for the presentation format descriptor.
      static java.lang.String CBUUIDCharacteristicUserDescriptionString()
      [@const] CBUUIDCharacteristicUserDescriptionString The string representation of the UUID for the user description descriptor.
      static java.lang.String CBUUIDCharacteristicValidRangeString()
      [@const] CBUUIDCharacteristicValidRangeString Data representing the valid min/max values accepted for a characteristic.
      static java.lang.String CBUUIDClientCharacteristicConfigurationString()
      [@const] CBUUIDClientCharacteristicConfigurationString The string representation of the UUID for the client configuration descriptor.
      static 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 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

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

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

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

        public static 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

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

        public static 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

        public static 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.
      • CBAdvertisementDataSolicitedServiceUUIDsKey

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

        public static 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

        public static 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

        public static 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

        public static 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

        public static 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

        public static 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

        public static 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

        public static 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

        public static 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

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

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

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

        public static 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

        public static 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

        public static 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

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

        public static 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

        public static 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

        public static 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

        public static 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

        public static 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

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

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

        public static 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
      • CBConnectPeripheralOptionStartDelayKey

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

        public static 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

        public static 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

        public static 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

        public static 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:}.