@maccesar/titools 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +27 -61
  2. package/lib/cleanup.js +29 -0
  3. package/lib/commands/agents.js +8 -7
  4. package/lib/commands/skills.js +118 -23
  5. package/lib/config.js +13 -15
  6. package/lib/installer.js +5 -3
  7. package/lib/utils.js +36 -0
  8. package/package.json +1 -1
  9. package/skills/alloy-guides/SKILL.md +188 -0
  10. package/skills/alloy-guides/references/CLI_TASKS.md +233 -0
  11. package/skills/alloy-guides/references/CONCEPTS.md +171 -0
  12. package/skills/alloy-guides/references/CONTROLLERS.md +279 -0
  13. package/skills/alloy-guides/references/MODELS.md +742 -0
  14. package/skills/alloy-guides/references/MODELS_ADVANCED.md +482 -0
  15. package/skills/alloy-guides/references/PURGETSS.md +57 -0
  16. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +235 -0
  17. package/skills/alloy-guides/references/VIEWS_STYLES.md +375 -0
  18. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +102 -0
  19. package/skills/alloy-guides/references/VIEWS_XML.md +581 -0
  20. package/skills/alloy-guides/references/WIDGETS.md +160 -0
  21. package/skills/alloy-howtos/SKILL.md +179 -0
  22. package/skills/alloy-howtos/references/best_practices.md +121 -0
  23. package/skills/alloy-howtos/references/cli_reference.md +230 -0
  24. package/skills/alloy-howtos/references/config_files.md +158 -0
  25. package/skills/alloy-howtos/references/custom_tags.md +148 -0
  26. package/skills/alloy-howtos/references/debugging_troubleshooting.md +78 -0
  27. package/skills/alloy-howtos/references/samples.md +156 -0
  28. package/skills/purgetss/SKILL.md +184 -181
  29. package/skills/purgetss/references/EXAMPLES.md +8 -6
  30. package/skills/purgetss/references/app-branding.md +5 -0
  31. package/skills/purgetss/references/apply-directive.md +1 -1
  32. package/skills/purgetss/references/class-categories.md +1 -1
  33. package/skills/purgetss/references/class-index-properties.md +618 -0
  34. package/skills/purgetss/references/class-index.md +4 -610
  35. package/skills/purgetss/references/cli-commands.md +41 -410
  36. package/skills/purgetss/references/custom-fonts.md +292 -0
  37. package/skills/purgetss/references/custom-rules.md +1 -1
  38. package/skills/purgetss/references/customization-deep-dive.md +64 -1
  39. package/skills/purgetss/references/icon-fonts.md +208 -118
  40. package/skills/purgetss/references/installation-setup.md +4 -4
  41. package/skills/purgetss/references/migration-guide.md +53 -1
  42. package/skills/purgetss/references/multi-density-images.md +53 -2
  43. package/skills/purgetss/references/svg-pipeline.md +249 -0
  44. package/skills/purgetss/references/tikit-components.md +2 -2
  45. package/skills/purgetss/references/titanium-resets.md +2 -2
  46. package/skills/purgetss/references/ui-ux-design.md +7 -5
  47. package/skills/purgetss/references/version-history.md +71 -82
  48. package/skills/ti-api/SKILL.md +128 -0
  49. package/skills/ti-api/references/api-android.md +675 -0
  50. package/skills/ti-api/references/api-app-platform.md +636 -0
  51. package/skills/ti-api/references/api-core.md +764 -0
  52. package/skills/ti-api/references/api-data-network.md +641 -0
  53. package/skills/ti-api/references/api-media.md +655 -0
  54. package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
  55. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
  56. package/skills/ti-api/references/api-modules-map.md +632 -0
  57. package/skills/ti-api/references/api-modules-nfc.md +725 -0
  58. package/skills/ti-api/references/api-modules-social-misc.md +526 -0
  59. package/skills/ti-api/references/api-services.md +700 -0
  60. package/skills/ti-api/references/api-ui-android.md +499 -0
  61. package/skills/ti-api/references/api-ui-extras.md +702 -0
  62. package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
  63. package/skills/ti-api/references/api-ui-ios.md +756 -0
  64. package/skills/ti-api/references/api-ui-lists.md +581 -0
  65. package/skills/ti-api/references/api-ui-text-input.md +607 -0
  66. package/skills/ti-api/references/api-ui-views.md +572 -0
  67. package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
  68. package/skills/ti-api/references/api-xml-global.md +743 -0
  69. package/skills/ti-guides/SKILL.md +82 -0
  70. package/skills/ti-guides/references/advanced-data-and-images.md +155 -0
  71. package/skills/ti-guides/references/android-manifest.md +97 -0
  72. package/skills/ti-guides/references/app-distribution.md +373 -0
  73. package/skills/ti-guides/references/application-frameworks.md +366 -0
  74. package/skills/ti-guides/references/cli-reference.md +700 -0
  75. package/skills/ti-guides/references/coding-best-practices.md +150 -0
  76. package/skills/ti-guides/references/commonjs-advanced.md +279 -0
  77. package/skills/ti-guides/references/hello-world.md +99 -0
  78. package/skills/ti-guides/references/hyperloop-native-access.md +458 -0
  79. package/skills/ti-guides/references/javascript-primer.md +402 -0
  80. package/skills/ti-guides/references/reserved-words.md +36 -0
  81. package/skills/ti-guides/references/resources.md +172 -0
  82. package/skills/ti-guides/references/style-and-conventions.md +104 -0
  83. package/skills/ti-guides/references/tiapp-config.md +655 -0
  84. package/skills/ti-howtos/SKILL.md +131 -0
  85. package/skills/ti-howtos/references/android-platform-deep-dives.md +609 -0
  86. package/skills/ti-howtos/references/automation-fastlane-appium.md +96 -0
  87. package/skills/ti-howtos/references/buffer-codec-streams.md +162 -0
  88. package/skills/ti-howtos/references/cross-platform-development.md +358 -0
  89. package/skills/ti-howtos/references/debugging-profiling.md +473 -0
  90. package/skills/ti-howtos/references/extending-titanium.md +684 -0
  91. package/skills/ti-howtos/references/google-maps-v2.md +172 -0
  92. package/skills/ti-howtos/references/ios-map-kit.md +149 -0
  93. package/skills/ti-howtos/references/ios-platform-deep-dives.md +595 -0
  94. package/skills/ti-howtos/references/local-data-sources.md +310 -0
  95. package/skills/ti-howtos/references/location-and-maps.md +267 -0
  96. package/skills/ti-howtos/references/media-apis.md +268 -0
  97. package/skills/ti-howtos/references/notification-services.md +539 -0
  98. package/skills/ti-howtos/references/remote-data-sources.md +339 -0
  99. package/skills/ti-howtos/references/tutorials.md +552 -0
  100. package/skills/ti-howtos/references/using-modules.md +182 -0
  101. package/skills/ti-howtos/references/web-content-integration.md +288 -0
  102. package/skills/ti-howtos/references/webpack-build-pipeline.md +125 -0
@@ -0,0 +1,657 @@
1
+ # Modules: BLE & Bluetooth API Reference
2
+
3
+ ## Modules.BLE
4
+ > Add-on Bluetooth Low Energy module
5
+ > Extends Ti.Module
6
+ > Platforms: both
7
+ > Type: module
8
+
9
+ ### Constants (99)
10
+ - **ADVERT_DATA_KEY_IS_\***: ADVERT_DATA_KEY_IS_CONNECTABLE
11
+ - **ADVERT_DATA_KEY_LOCAL_\***: ADVERT_DATA_KEY_LOCAL_NAME
12
+ - **ADVERT_DATA_KEY_MANUFACTURER_\***: ADVERT_DATA_KEY_MANUFACTURER_DATA
13
+ - **ADVERT_DATA_KEY_OVERFLOW_SERVICE_\***: ADVERT_DATA_KEY_OVERFLOW_SERVICE_UUIDS
14
+ - **ADVERT_DATA_KEY_SERVICE_\***: ADVERT_DATA_KEY_SERVICE_DATA, ADVERT_DATA_KEY_SERVICE_UUIDS
15
+ - **ADVERT_DATA_KEY_SOLICITED_SERVICE_\***: ADVERT_DATA_KEY_SOLICITED_SERVICE_UUIDS
16
+ - **ADVERT_DATA_KEY_TX_POWER_\***: ADVERT_DATA_KEY_TX_POWER_LEVEL
17
+ - **ATT_\***: ATT_SUCCESS, ATT_FAILURE
18
+ - **ATT_ATTRIBUTE_NOT_FOUND_\***: ATT_ATTRIBUTE_NOT_FOUND_ERROR
19
+ - **ATT_ATTRIBUTE_NOT_LONG_\***: ATT_ATTRIBUTE_NOT_LONG_ERROR
20
+ - **ATT_INSUFFICIENT_AUTHENTICATION_\***: ATT_INSUFFICIENT_AUTHENTICATION_ERROR
21
+ - **ATT_INSUFFICIENT_AUTHORIZATION_\***: ATT_INSUFFICIENT_AUTHORIZATION_ERROR
22
+ - **ATT_INSUFFICIENT_ENCRYPTION_\***: ATT_INSUFFICIENT_ENCRYPTION_ERROR
23
+ - **ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE_\***: ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE_ERROR
24
+ - **ATT_INSUFFICIENT_RESOURCES_\***: ATT_INSUFFICIENT_RESOURCES_ERROR
25
+ - **ATT_INVALID_ATTRIBUTE_VALUE_LENGTH_\***: ATT_INVALID_ATTRIBUTE_VALUE_LENGTH_ERROR
26
+ - **ATT_INVALID_HANDLE_\***: ATT_INVALID_HANDLE_ERROR
27
+ - **ATT_INVALID_OFFSET_\***: ATT_INVALID_OFFSET_ERROR
28
+ - **ATT_INVALID_PDU_\***: ATT_INVALID_PDU_ERROR
29
+ - **ATT_PREPARE_QUEUE_FULL_\***: ATT_PREPARE_QUEUE_FULL_ERROR
30
+ - **ATT_READ_NOT_PERMITTED_\***: ATT_READ_NOT_PERMITTED_ERROR
31
+ - **ATT_REQUEST_NOT_SUPPORTED_\***: ATT_REQUEST_NOT_SUPPORTED_ERROR
32
+ - **ATT_UNLIKELY_\***: ATT_UNLIKELY_ERROR
33
+ - **ATT_UNSUPPORTED_GROUP_TYPE_\***: ATT_UNSUPPORTED_GROUP_TYPE_ERROR
34
+ - **ATT_WRITE_NOT_PERMITTED_\***: ATT_WRITE_NOT_PERMITTED_ERROR
35
+ - **AUTHORISATION_STATUS_\***: AUTHORISATION_STATUS_RESTRICTED, AUTHORISATION_STATUS_DENIED
36
+ - **AUTHORISATION_STATUS_ALLOWED_\***: AUTHORISATION_STATUS_ALLOWED_ALWAYS
37
+ - **AUTHORISATION_STATUS_NOT_\***: AUTHORISATION_STATUS_NOT_DETERMINED
38
+ - **BEACON_PROXIMITY_\***: BEACON_PROXIMITY_UNKNOWN, BEACON_PROXIMITY_IMMEDIATE, BEACON_PROXIMITY_NEAR, BEACON_PROXIMITY_FAR
39
+ - **CBUUID_CHARACTERISTIC_AGGREGATE_FORMAT_\***: CBUUID_CHARACTERISTIC_AGGREGATE_FORMAT_STRING
40
+ - **CBUUID_CHARACTERISTIC_EXTENDED_PROPERTIES_\***: CBUUID_CHARACTERISTIC_EXTENDED_PROPERTIES_STRING
41
+ - **CBUUID_CHARACTERISTIC_FORMAT_\***: CBUUID_CHARACTERISTIC_FORMAT_STRING
42
+ - **CBUUID_CHARACTERISTIC_USER_DESCRIPTION_\***: CBUUID_CHARACTERISTIC_USER_DESCRIPTION_STRING
43
+ - **CBUUID_CLIENT_CHARACTERISTIC_CONFIGURATION_\***: CBUUID_CLIENT_CHARACTERISTIC_CONFIGURATION_STRING
44
+ - **CBUUID_L2CAPPSM_CHARACTERISTIC_\***: CBUUID_L2CAPPSM_CHARACTERISTIC_STRING
45
+ - **CBUUID_SERVER_CHARACTERISTIC_CONFIGURATION_\***: CBUUID_SERVER_CHARACTERISTIC_CONFIGURATION_STRING
46
+ - **CHARACTERISTIC_PERMISSION_\***: CHARACTERISTIC_PERMISSION_READABLE, CHARACTERISTIC_PERMISSION_WRITEABLE
47
+ - **CHARACTERISTIC_PERMISSION_READ_\***: CHARACTERISTIC_PERMISSION_READ_ENCRYPTED
48
+ - **CHARACTERISTIC_PERMISSION_WRITE_\***: CHARACTERISTIC_PERMISSION_WRITE_ENCRYPTED
49
+ - **CHARACTERISTIC_PROPERTIES_\***: CHARACTERISTIC_PROPERTIES_BROADCAST, CHARACTERISTIC_PROPERTIES_READ, CHARACTERISTIC_PROPERTIES_WRITE, CHARACTERISTIC_PROPERTIES_NOTIFY, CHARACTERISTIC_PROPERTIES_INDICATE
50
+ - **CHARACTERISTIC_PROPERTIES_AUTHENTICATED_SIGNED_\***: CHARACTERISTIC_PROPERTIES_AUTHENTICATED_SIGNED_WRITES
51
+ - **CHARACTERISTIC_PROPERTIES_EXTENDED_\***: CHARACTERISTIC_PROPERTIES_EXTENDED_PROPERTIES
52
+ - **CHARACTERISTIC_PROPERTIES_INDICATE_ENCRYPTION_\***: CHARACTERISTIC_PROPERTIES_INDICATE_ENCRYPTION_REQUIRED
53
+ - **CHARACTERISTIC_PROPERTIES_NOTIFY_ENCRYPTION_\***: CHARACTERISTIC_PROPERTIES_NOTIFY_ENCRYPTION_REQUIRED
54
+ - **CHARACTERISTIC_PROPERTIES_WRITE_WITHOUT_\***: CHARACTERISTIC_PROPERTIES_WRITE_WITHOUT_RESPONSE
55
+ - **CHARACTERISTIC_TYPE_WRITE_WITH_\***: CHARACTERISTIC_TYPE_WRITE_WITH_RESPONSE
56
+ - **CHARACTERISTIC_TYPE_WRITE_WITHOUT_\***: CHARACTERISTIC_TYPE_WRITE_WITHOUT_RESPONSE
57
+ - **CONNECT_PERIPHERAL_OPTIONS_KEY_ENABLE_TRANSPORT_\***: CONNECT_PERIPHERAL_OPTIONS_KEY_ENABLE_TRANSPORT_BRIDGING
58
+ - **CONNECT_PERIPHERAL_OPTIONS_KEY_NOTIFY_ON_\***: CONNECT_PERIPHERAL_OPTIONS_KEY_NOTIFY_ON_CONNECTION, CONNECT_PERIPHERAL_OPTIONS_KEY_NOTIFY_ON_DISCONNECTION, CONNECT_PERIPHERAL_OPTIONS_KEY_NOTIFY_ON_NOTIFICATION
59
+ - **CONNECT_PERIPHERAL_OPTIONS_KEY_REQUIRES_\***: CONNECT_PERIPHERAL_OPTIONS_KEY_REQUIRES_ANCS
60
+ - **CONNECT_PERIPHERAL_OPTIONS_KEY_START_\***: CONNECT_PERIPHERAL_OPTIONS_KEY_START_DELAY
61
+ - **CONNECTION_EVENT_TYPE_PEER_\***: CONNECTION_EVENT_TYPE_PEER_DISCONNECTED, CONNECTION_EVENT_TYPE_PEER_CONNECTED
62
+ - **CONNECTION_PRIORITY_\***: CONNECTION_PRIORITY_HIGH, CONNECTION_PRIORITY_BALANCED
63
+ - **CONNECTION_PRIORITY_LOW_\***: CONNECTION_PRIORITY_LOW_POWER
64
+ - **DESCRIPTOR_PERMISSION_\***: DESCRIPTOR_PERMISSION_READ, DESCRIPTOR_PERMISSION_WRITE
65
+ - **DESCRIPTOR_PERMISSION_READ_\***: DESCRIPTOR_PERMISSION_READ_ENCRYPTED
66
+ - **DESCRIPTOR_PERMISSION_WRITE_\***: DESCRIPTOR_PERMISSION_WRITE_ENCRYPTED
67
+ - **DISABLE_NOTIFICATION_\***: DISABLE_NOTIFICATION_VALUE
68
+ - **ENABLE_INDICATION_\***: ENABLE_INDICATION_VALUE
69
+ - **ENABLE_NOTIFICATION_\***: ENABLE_NOTIFICATION_VALUE
70
+ - **LOCATION_MANAGER_AUTHORIZATION_STATUS_\***: LOCATION_MANAGER_AUTHORIZATION_STATUS_DENIED, LOCATION_MANAGER_AUTHORIZATION_STATUS_RESTRICTED
71
+ - **LOCATION_MANAGER_AUTHORIZATION_STATUS_AUTHORIZED_\***: LOCATION_MANAGER_AUTHORIZATION_STATUS_AUTHORIZED_ALWAYS
72
+ - **LOCATION_MANAGER_AUTHORIZATION_STATUS_AUTHORIZED_WHEN_IN_\***: LOCATION_MANAGER_AUTHORIZATION_STATUS_AUTHORIZED_WHEN_IN_USE
73
+ - **LOCATION_MANAGER_AUTHORIZATION_STATUS_NOT_\***: LOCATION_MANAGER_AUTHORIZATION_STATUS_NOT_DETERMINED
74
+ - **MANAGER_STATE_\***: MANAGER_STATE_UNKNOWN, MANAGER_STATE_RESETTING, MANAGER_STATE_UNSUPPORTED, MANAGER_STATE_UNAUTHORIZED
75
+ - **MANAGER_STATE_POWERED_\***: MANAGER_STATE_POWERED_OFF, MANAGER_STATE_POWERED_ON
76
+ - **MANAGER_STATE_TURNING_\***: MANAGER_STATE_TURNING_OFF, MANAGER_STATE_TURNING_ON
77
+ - **PERIPHERAL_MANAGER_CONNECTION_LATENCY_\***: PERIPHERAL_MANAGER_CONNECTION_LATENCY_LOW, PERIPHERAL_MANAGER_CONNECTION_LATENCY_MEDIUM, PERIPHERAL_MANAGER_CONNECTION_LATENCY_HIGH
78
+ - **PERIPHERAL_STATE_\***: PERIPHERAL_STATE_DISCONNECTED, PERIPHERAL_STATE_CONNECTING, PERIPHERAL_STATE_CONNECTED, PERIPHERAL_STATE_DISCONNECTING
79
+ - **REGION_STATE_\***: REGION_STATE_UNKNOWN, REGION_STATE_INSIDE, REGION_STATE_OUTSIDE
80
+
81
+
82
+ ### Methods (14)
83
+ | Method | Returns | Platform | Description |
84
+ |--------|---------|----------|-------------|
85
+ | initCentralManager(showPowerAlert, restoreIdentifier) | Modules.BLE.CentralManager | both | Initializes the module's central manager. This fu… |
86
+ | initPeripheralManager(showPowerAlert, restoreIdentifier) | Modules.BLE.PeripheralManager | both | Initializes the module's peripheral manager objec… |
87
+ | createBeaconRegion(uuid, identifier, major, minor) | Modules.BLE.BeaconRegion | ios | create Beacon Region. |
88
+ | createDescriptor(value, uuid, permission) | Modules.BLE.Descriptor | both | create descriptor. |
89
+ | createMutableCharacteristic(properties, permissions, uuid, descriptors) | Modules.BLE.MutableCharacteristic | both | create mutable characteristic. |
90
+ | createBeaconIdentityConstraint(uuid, major, minor) | Modules.BLE.BeaconIdentityConstraint | ios | create a constraint that describes the identity c… |
91
+ | createRegionManager(—) | Modules.BLE.RegionManager | ios | create a region manager to scan beacons. |
92
+ | disable(—) | Boolean | android | Disables the local Bluetooth adapter. |
93
+ | enable(—) | Boolean | android | Enables the local Bluetooth adapter. |
94
+ | isEnabled(—) | Boolean | android | Determines if Bluetooth is currently enabled and … |
95
+ | isBluetoothAndBluetoothAdminPermissionsGranted(—) | Boolean | android | Determines if bluetooth permissions have been gra… |
96
+ | requestPermissions(callback) | Promise<Titanium.Android.RequestPermissionAccessResult> | android | Displays a dialog requesting bluetooth permission… |
97
+ | isSupported(—) | Boolean | android | Determines whether Bluetooth Low Energy feature i… |
98
+ | isAdvertisingSupported(—) | Boolean | android | Determines whether Bluetooth Low Energy Advertisi… |
99
+
100
+
101
+ ---
102
+
103
+ ## Modules.BLE.Beacon
104
+ > Represents a beacon that was encountered during region monitoring. You do not create instances of this class directly. They will be delivered via the rangedBeacons event.
105
+ > Extends Ti.Proxy
106
+ > Platforms: ios
107
+
108
+ ### Properties (unique: 7/9)
109
+ | Property | Type | Platform | Description |
110
+ |----------|------|----------|-------------|
111
+ | accuracy | String | ios | Indicates the one sigma horizontal accuracy in me… |
112
+ | major | Number | ios | The value identifying a group of beacons. |
113
+ | minor | Number | ios | The value identifying a specific beacon within a … |
114
+ | proximity | Number | ios | The relative distance to the beacon. |
115
+ | rssi | Number | ios | The received signal strength of the beacon, measu… |
116
+ | uuid | String | ios | The unique ID of the beacons being targeted. |
117
+ | timestamp | Number | ios | The time when this beacon was observed. |
118
+
119
+
120
+
121
+
122
+ ---
123
+
124
+ ## Modules.BLE.BeaconIdentityConstraint
125
+ > Represents a beacon that was encountered during region monitoring. You do not create instances of this class directly. They will be delivered via the rangedBeacons event.
126
+ > Extends Ti.Proxy
127
+ > Platforms: ios
128
+
129
+ ### Properties (unique: 3/5)
130
+ | Property | Type | Platform | Description |
131
+ |----------|------|----------|-------------|
132
+ | major | Number | ios | The value identifying a group of beacons. |
133
+ | minor | Number | ios | The value identifying a specific beacon within a … |
134
+ | uuid | String | ios | The unique ID of the beacons being targeted. |
135
+
136
+
137
+
138
+
139
+ ---
140
+
141
+ ## Modules.BLE.BeaconRegion
142
+ > A region used to detect the presence of iBeacon devices.
143
+ > Extends Ti.Proxy
144
+ > Platforms: ios
145
+
146
+ ### Properties (unique: 5/7)
147
+ | Property | Type | Platform | Description |
148
+ |----------|------|----------|-------------|
149
+ | identifier | String | ios | This is a value that you specify and can use to i… |
150
+ | major | Number | ios | The value identifying a group of beacons. |
151
+ | minor | Number | ios | The value identifying a specific beacon within a … |
152
+ | notifyEntryStateOnDisplay | Number | ios | The relative distance to the beacon. A Boolean in… |
153
+ | uuid | String | ios | The unique ID of the beacons being targeted. |
154
+
155
+
156
+
157
+
158
+ ---
159
+
160
+ ## Modules.BLE.Central
161
+ > represent a remote device acting as central, connected to a local app, which is acting as a peripheral.
162
+ > Extends Ti.Proxy
163
+ > Platforms: both
164
+
165
+ ### Properties (unique: 2/5)
166
+ | Property | Type | Platform | Description |
167
+ |----------|------|----------|-------------|
168
+ | maximumUpdateValueLength | Number | ios | The maximum amount of data, in bytes, that can be… |
169
+ | address | String | both | The address (UUID) of device acting as a central. |
170
+
171
+
172
+
173
+
174
+ ---
175
+
176
+ ## Modules.BLE.CentralManager
177
+ > An object that scans for, discovers, connects to, and manages peripherals.
178
+ > Extends Ti.Proxy
179
+ > Platforms: both
180
+
181
+ ### Properties (unique: 3/6)
182
+ | Property | Type | Platform | Description |
183
+ |----------|------|----------|-------------|
184
+ | state | Number | both | State of the module's internal central manager. F… |
185
+ | isScanning | Boolean | both | A Boolean value that indicates whether the centra… |
186
+ | peripherals | Array<Modules.BLE.Peripheral> | both | All discovered peripherals |
187
+
188
+
189
+ ### Methods (10)
190
+ | Method | Returns | Platform | Description |
191
+ |--------|---------|----------|-------------|
192
+ | isAccessFineLocationPermissionGranted(—) | Boolean | android | Determines whether the ACCESS_FINE_LOCATION permi… |
193
+ | requestAccessFineLocationPermission(—) | void | android | Request for the `ACCESS_FINE_LOCATION`. |
194
+ | createPeripheral(address) | Modules.BLE.Peripheral | android | Creates a Modules.BLE.Peripheral class object wit… |
195
+ | startScan(services, options) | void | both | Starts scanning for peripherals. |
196
+ | stopScan(—) | void | both | Stops scanning for peripherals. |
197
+ | retrievePeripheralsWithIdentifiers(UUIDs) | Array<Modules.BLE.Peripheral> | ios | Returns a list of known peripherals by their iden… |
198
+ | retrieveConnectedPeripheralsWithServices(UUIDs) | Array<Modules.BLE.Peripheral> | ios | Returns a list of the peripherals connected to th… |
199
+ | registerForConnectionEvents(peripherals, services) | void | ios | Calls connectionEventDidOccur event when a connec… |
200
+ | cancelPeripheralConnection(peripheral) | void | both | Cancels an active or pending connection to periph… |
201
+ | connectPeripheral(peripheral, options) | void | both | Initiates a connection to peripheral. Connection … |
202
+
203
+ ### Events (8)
204
+ | Event | Platform | Description |
205
+ |-------|----------|-------------|
206
+ | didUpdateState | both | A event called when centrel manager state updated |
207
+ | willRestoreState | ios | A event called when centrel manager will restore state |
208
+ | didDiscoverPeripheral | both | A event called when centrel manager discover peripheral |
209
+ | didConnectPeripheral | both | This event is called when a connection initiated by connectPeripheral has succe… |
210
+ | didFailToConnectPeripheral | ios | This event is called when a connection initiated by connectPeripheral has faile… |
211
+ | didDisconnectPeripheral | both | This event is called when a peripheral disconnected. |
212
+ | connectionEventDidOccur | ios | This method is called upon the connection or disconnection of a peripheral that… |
213
+ | didUpdateANCSAuthorization | ios | This event is called when the authorization status changes for a peripheral con… |
214
+
215
+ ---
216
+
217
+ ## Modules.BLE.Characteristic
218
+ > A characteristic of a remote peripheral’s service.
219
+ > Extends Ti.Proxy
220
+ > Platforms: ios
221
+
222
+ ### Properties (unique: 8/10)
223
+ | Property | Type | Platform | Description |
224
+ |----------|------|----------|-------------|
225
+ | descriptors | Array<Modules.BLE.Descriptor> | ios | A list of the Descriptor* objects that have so fa… |
226
+ | isMutable | Boolean | ios | Indicates whether this characteristic is mutable. |
227
+ | properties | Number | ios | The properties of the characteristic as a bitfiel… |
228
+ | service | Modules.BLE.Service | ios | The service this characteristic belongs to. |
229
+ | uuid | String | ios | The Bluetooth-specific UUID of the attribute. |
230
+ | value | Ti.Buffer | ios | The value of the characteristic. |
231
+ | isNotifying | Boolean | ios | Whether the characteristic is currently notifying… |
232
+ | isMutable | Boolean | ios | Indicates whether this characteristic is mutable. |
233
+
234
+
235
+ ### Methods (1)
236
+ | Method | Returns | Platform | Description |
237
+ |--------|---------|----------|-------------|
238
+ | equal(characteristic) | Boolean | ios | tests whether two characteristics are same or not. |
239
+
240
+
241
+ ---
242
+
243
+ ## Modules.BLE.DescriptorRequest
244
+ > A request that uses the Attribute Protocol (ATT).
245
+ > Extends Ti.Proxy
246
+ > Platforms: android
247
+
248
+ ### Properties (unique: 5/8)
249
+ | Property | Type | Platform | Description |
250
+ |----------|------|----------|-------------|
251
+ | central | Modules.BLE.Central | android | The central that originated the request. |
252
+ | descriptor | Modules.BLE.Descriptor | android | The descriptor whose value will be read or writte… |
253
+ | offset | Number | android | The offset given for the value |
254
+ | value | Ti.Buffer | android | The data being read or written. |
255
+ | responseNeeded | Boolean | android | If the remote device requires a response. |
256
+
257
+
258
+ ### Methods (1)
259
+ | Method | Returns | Platform | Description |
260
+ |--------|---------|----------|-------------|
261
+ | updateValue(value) | void | android | update the data of value field |
262
+
263
+
264
+ ---
265
+
266
+ ## Modules.BLE.L2CAPChannel
267
+ > L2Cap allow us to open a side channel, with it we can directly read and write without any framing limitation, packet size limitations. It’s a direct way to talk between our devices and accessories.
268
+ > Extends Ti.Proxy
269
+ > Platforms: both
270
+
271
+ ### Properties (unique: 2/5)
272
+ | Property | Type | Platform | Description |
273
+ |----------|------|----------|-------------|
274
+ | peer | Modules.BLE.Peer | ios | The peer connected to the channel |
275
+ | psm | Number | both | The PSM of the channel. |
276
+
277
+
278
+ ### Methods (4)
279
+ | Method | Returns | Platform | Description |
280
+ |--------|---------|----------|-------------|
281
+ | write(data) | void | both | write data to channel |
282
+ | getReadBufferSize(—) | Number | both | Get the size of the read buffer in bytes. |
283
+ | setReadBufferSize(size) | void | both | Sets the size of the read buffer in bytes. |
284
+ | close(—) | void | both | closes the l2cap channel |
285
+
286
+ ### Events (3)
287
+ | Event | Platform | Description |
288
+ |-------|----------|-------------|
289
+ | onDataReceived | both | Fired whenever new data recived on channel. |
290
+ | onStreamError | both | Fired whenever there is some error in reading or writing. |
291
+ | onStreamEndEncountered | ios | Fired whenever the end of the stream has been reached. |
292
+
293
+ ---
294
+
295
+ ## Modules.BLE.MutableCharacteristic
296
+ > A characteristic of a local peripheral’s service.
297
+ > Extends Ti.Proxy
298
+ > Platforms: both
299
+
300
+ ### Properties (unique: 2/5)
301
+ | Property | Type | Platform | Description |
302
+ |----------|------|----------|-------------|
303
+ | subscribedCentrals | Modules.BLE.Central | both | For notifying characteristics, the set of current… |
304
+ | permissions | Number | ios | The permissions of the characteristic value. It i… |
305
+
306
+
307
+
308
+
309
+ ---
310
+
311
+ ## Modules.BLE.Peer
312
+ > An object that represents a remote device.
313
+ > Extends Ti.Proxy
314
+ > Platforms: ios
315
+
316
+ ### Properties (unique: 1/3)
317
+ | Property | Type | Platform | Description |
318
+ |----------|------|----------|-------------|
319
+ | identifier | String | ios | The UUID associated with the peer. |
320
+
321
+
322
+
323
+
324
+ ---
325
+
326
+ ## Modules.BLE.Peripheral
327
+ > A remote peripheral device.
328
+ > Extends Ti.Proxy
329
+ > Platforms: both
330
+
331
+ ### Properties (unique: 7/10)
332
+ | Property | Type | Platform | Description |
333
+ |----------|------|----------|-------------|
334
+ | isConnected | Boolean | both | Whether or not the peripheral is currently connec… |
335
+ | name | String | both | The name of the peripheral. |
336
+ | services | Array<Modules.BLE.Service> | both | A list of a peripheral’s discovered services. |
337
+ | state | Number | ios | The current connection state of the peripheral. P… |
338
+ | address | String | both | Once a peripheral has been connected at least onc… |
339
+ | canSendWriteWithoutResponse | Boolean | ios | A Boolean value that indicates whether the remote… |
340
+ | ancsAuthorized | Boolean | ios | A Boolean value that indicates if the remote devi… |
341
+
342
+
343
+ ### Methods (14)
344
+ | Method | Returns | Platform | Description |
345
+ |--------|---------|----------|-------------|
346
+ | readRSSI(—) | void | both | Retrieves the current RSSI value for the peripher… |
347
+ | requestConnectionPriority(connectionPriority) | void | android | Request the specific connection priority. This me… |
348
+ | discoverCharacteristics(services, characteristicUUIDs) | void | both | Discovers the specified characteristic(s) of a se… |
349
+ | discoverDescriptorsForCharacteristic(characteristic) | void | both | Discovers the descriptor(s) of a characteristic.T… |
350
+ | discoverIncludedServices(services, includedServiceUUIDs) | void | both | Discovers the specified included service(s) of a … |
351
+ | discoverServices(serviceUUIDs) | void | both | Discovers available service(s) on the peripheral.… |
352
+ | readValueForCharacteristic(characteristic) | void | both | Reads the value of a characteristic.The result of… |
353
+ | readValueForDescriptor(descriptor) | void | both | Reads the value of a descriptor. The result of th… |
354
+ | subscribeToCharacteristic(characteristic, descriptorUUID="00002902-0000-1000-8000-00805f9b34fb", descriptorValue=ENABLE_NOTIFICATION_VALUE) | void | both | Enables notifications/indications for a character… |
355
+ | unsubscribeFromCharacteristic(characteristic, descriptorUUID="00002902-0000-1000-8000-00805f9b34fb", descriptorValue=DISABLE_NOTIFICATION_VALUE) | void | both | Disables notifications/indications for a characte… |
356
+ | writeValueForCharacteristic(characteristic, data, characteristicWriteType) | void | both | Writes a value to a characteristic. |
357
+ | writeValueForDescriptor(descriptor, data) | void | both | Writes the value of a descriptor. The result of t… |
358
+ | maximumWriteValueLength(characteristicWriteType) | void | ios | The maximum amount of data, in bytes, you can sen… |
359
+ | openL2CAPChannel(psmIdentifier, encryptionRequired) | void | both | Attempts to open an L2CAP channel to the peripher… |
360
+
361
+ ### Events (14)
362
+ | Event | Platform | Description |
363
+ |-------|----------|-------------|
364
+ | didDiscoverCharacteristics | both | This event returns the result of a call to the discoverCharacteristics method. … |
365
+ | didDiscoverDescriptorsForCharacteristics | both | This event returns the result of a call to the discoverDescriptorsForCharacteri… |
366
+ | didDiscoverIncludedServices | both | This event returns the result of a call to the discoverIncludedServices method. |
367
+ | didDiscoverServices | ios | Discovers the specified services of the peripheral. |
368
+ | didModifyServices | ios | This event is fired when the services of the peripheral change. |
369
+ | didUpdateName | ios | This event is fired when the name of the peripheral changes. |
370
+ | didUpdateNotificationStateForCharacteristics | both | This event returns the result of a call to the subscribeToCharacteristic or uns… |
371
+ | didReadRSSI | both | This event returns the result of a call to the readRSSI method. |
372
+ | didUpdateValueForCharacteristic | both | This event is fired after a call to the readValueForCharacteristic method, or u… |
373
+ | didUpdateValueForDescriptor | both | This event returns the result of a call to the readValueForDescriptor method. |
374
+ | didWriteValueForCharacteristic | both | This event returns the result of a call to the writeValueForCharacteristic meth… |
375
+ | didWriteValueForDescriptor | both | This event returns the result of a call to the writeValueForDescriptor method. |
376
+ | peripheralIsReadyToSendWriteWithoutResponse | ios | Tells the delegate that a peripheral is again ready to send characteristic upda… |
377
+ | didOpenChannel | both | This method delivers the result of a previous call to openL2CAPChannel. |
378
+
379
+ ---
380
+
381
+ ## Modules.BLE.PeripheralManager
382
+ > An object that manages and advertises peripheral services exposed by this app.
383
+ > Extends Ti.Proxy
384
+ > Platforms: both
385
+
386
+ ### Properties (unique: 3/6)
387
+ | Property | Type | Platform | Description |
388
+ |----------|------|----------|-------------|
389
+ | isAdvertising | Boolean | both | Whether or not the the module's internal peripher… |
390
+ | peripheralManagerState | Number | both | State of the module's internal peripheral manager… |
391
+ | restoredPeripheralManagerIdentifier | String | ios | string the restoration identifier for a periphera… |
392
+
393
+
394
+ ### Methods (14)
395
+ | Method | Returns | Platform | Description |
396
+ |--------|---------|----------|-------------|
397
+ | addService(characteristics, uuid, primary) | Modules.BLE.Service | both | Publishes a service and any of its associated cha… |
398
+ | removeService(service) | void | both | Removes a specified published service from the lo… |
399
+ | removeAllServices(—) | void | both | Removes all published services from the local GAT… |
400
+ | respondToRequest(request, result) | void | both | Used to respond to request(s) received via the di… |
401
+ | respondToDescriptorRequest(descriptorRequest, result) | void | android | Used to respond to request(s) received via the di… |
402
+ | publishL2CAPChannel(encryptionRequired) | void | both | Attempts to open an L2CAP channel to the peripher… |
403
+ | unpublishL2CAPChannel(PSM) | void | both | The service PSM to be removed from the system. |
404
+ | startAdvertising(localName, serviceUUIDs) | void | both | Instructs the module's internal peripheral manage… |
405
+ | stopAdvertising(—) | void | both | Instructs the module's internal peripheral manage… |
406
+ | startAdvertisingBeaconRegion(measurePower, beaconRegion) | void | ios | Instructs the module's internal peripheral manage… |
407
+ | stopAdvertising(—) | void | ios | Instructs the module's internal peripheral manage… |
408
+ | updateValue(characteristic, data, centrals) | Boolean | both | Instructs the module's internal peripheral manage… |
409
+ | setDesiredConnectionLatency(latency, central) | void | ios | Sets the desired connection latency for an existi… |
410
+ | closePeripheral(—) | void | android | This method closes the peripheral. |
411
+
412
+ ### Events (14)
413
+ | Event | Platform | Description |
414
+ |-------|----------|-------------|
415
+ | didUpdateState | both | Fired whenever the state of the module's internal peripheral manager changes. |
416
+ | didPublishL2CAPChannel | both | Tells the delegate that the peripheral manager created a listener for incoming … |
417
+ | didUnpublishL2CAPChannel | both | Tells the delegate that the peripheral manager removed a published service from… |
418
+ | didOpenL2CAPChannel | both | Tells the delegate that the peripheral manager opened an L2CAP channel. |
419
+ | willRestoreState | ios | Tells the delegate that the peripheral manager opened an L2CAP channel. |
420
+ | didStartAdvertising | both | This event returns the result of a startAdvertising call. If advertisement coul… |
421
+ | didAddService | both | This event returns the result of a addService call. If service could not be add… |
422
+ | didSubscribeToCharacteristic | both | This event is fired when a central configures a characteristic to notify or ind… |
423
+ | didUnsubscribeFromCharacteristic | both | This event is fired when a central removes notifications/indications from a cha… |
424
+ | didReceiveReadRequest | both | This event is fired when the module's internal peripheral manager receives a re… |
425
+ | didReceiveWriteRequests | both | This event is fired when the module's internal peripheral manager receives a wr… |
426
+ | didReceiveDescriptorReadRequest | android | This event is fired when the module's internal peripheral manager receives a re… |
427
+ | didReceiveDescriptorWriteRequests | android | This event is fired when the module's internal peripheral manager receives a wr… |
428
+ | readyToUpdateSubscribers | ios | This event is fired when the module's internal peripheral manager receives a wr… |
429
+
430
+ ---
431
+
432
+ ## Modules.BLE.RegionManager
433
+ > An object that manages and scan beacons.
434
+ > Extends Ti.Proxy
435
+ > Platforms: ios
436
+
437
+ ### Properties (unique: 8/10)
438
+ | Property | Type | Platform | Description |
439
+ |----------|------|----------|-------------|
440
+ | locationManagerAuthorizationStatus | Number | ios | Returns the current authorization status of the c… |
441
+ | maximumRegionMonitoringDistance | Number | ios | The maximum region size, in terms of a distance f… |
442
+ | monitoredRegions | Array<Modules.BLE.BeaconRegion> | ios | Retrieve a set of objects for the regions that ar… |
443
+ | rangedRegions | Array<Modules.BLE.BeaconRegion> | ios | Retrieve a set of objects representing the region… |
444
+ | rangedBeaconConstraints | Array<Modules.BLE.BeaconIdentityConstraint> | ios | Retrieve a set of beacon constraints for which th… |
445
+ | locationServicesEnabled | Boolean | ios | Determines whether the user has location services… |
446
+ | isRangingAvailable | Boolean | ios | Determines whether the device supports ranging. |
447
+ | isMonitoringAvailable | Boolean | ios | Determines whether the device supports monitoring… |
448
+
449
+
450
+ ### Methods (9)
451
+ | Method | Returns | Platform | Description |
452
+ |--------|---------|----------|-------------|
453
+ | requestAlwaysAuthorization(—) | void | ios | When locationManagerAuthorizationStatus == LOCATI… |
454
+ | requestWhenInUseAuthorization(—) | void | ios | When locationManagerAuthorizationStatus == LOCATI… |
455
+ | requestRegionState(beaconRegion) | void | ios | Asynchronously retrieve the cached state of the s… |
456
+ | startRangingBeaconsInRegion(beaconRegion) | void | ios | Start calculating ranges for beacons in the speci… |
457
+ | stopRangingBeaconsInRegion(beaconRegion) | void | ios | Stop calculating ranges for the specified region. |
458
+ | startRangingBeaconsSatisfyingIdentityConstraint(identityConstraint) | void | ios | Start calculating ranges for beacons in the speci… |
459
+ | stopRangingBeaconsSatisfyingIdentityConstraint(identityConstraint) | void | ios | Stop an earlier beacon ranging request. See start… |
460
+ | startRegionMonitoring(beaconRegion) | void | ios | Start monitoring the specified region. |
461
+ | stopRegionMonitoring(beaconRegion) | void | ios | Stop monitoring the specified region. |
462
+
463
+ ### Events (11)
464
+ | Event | Platform | Description |
465
+ |-------|----------|-------------|
466
+ | didEnterRegion | ios | Invoked when the user enters a monitored region. |
467
+ | didExitRegion | ios | Invoked when the user exits a monitored region |
468
+ | didRangeBeacons | ios | Invoked when a new set of beacons are available in the specified region |
469
+ | didRange | ios | Invoked when a new set of beacons are available in the specified Beacon Identit… |
470
+ | didFailRanging | ios | Invoked when an error has occurred ranging beacons in a region. |
471
+ | didFail | ios | Invoked when an any error has occurred. |
472
+ | rangingBeaconsDidFail | ios | Invoked when an error has occurred ranging beacons in a region. |
473
+ | didDetermineState | ios | Invoked when there's a state transition for a monitored region or in response t… |
474
+ | didStartMonitoring | ios | Invoked when a monitoring for a region started successfully. |
475
+ | monitoringDidFail | ios | Invoked when an error has occurred monitoring beacons in a region. |
476
+ | didChangeAuthorization | ios | Invoked when the authorization status changes for this application. |
477
+
478
+ ---
479
+
480
+ ## Modules.BLE.Request
481
+ > A request that uses the Attribute Protocol (ATT).
482
+ > Extends Ti.Proxy
483
+ > Platforms: both
484
+
485
+ ### Properties (unique: 5/8)
486
+ | Property | Type | Platform | Description |
487
+ |----------|------|----------|-------------|
488
+ | central | Modules.BLE.Central | both | The central that originated the request. |
489
+ | characteristic | Modules.BLE.Characteristic | both | The characteristic whose value will be read or wr… |
490
+ | offset | Number | both | The zero-based index of the first byte for the re… |
491
+ | value | Ti.Buffer | both | The data being read or written. |
492
+ | responseNeeded | Boolean | android | If the remote device requires a response. |
493
+
494
+
495
+ ### Methods (1)
496
+ | Method | Returns | Platform | Description |
497
+ |--------|---------|----------|-------------|
498
+ | updateValue(value) | void | both | update the data of value field |
499
+
500
+
501
+ ---
502
+
503
+ ## Modules.BLE.Service
504
+ > A collection of data and associated behaviors that accomplish a function or feature of a device.
505
+ > Extends Ti.Proxy
506
+ > Platforms: both
507
+
508
+ ### Properties (unique: 5/8)
509
+ | Property | Type | Platform | Description |
510
+ |----------|------|----------|-------------|
511
+ | characteristics | Array<Modules.BLE.Characteristic> | both | A list of characteristics discovered in this serv… |
512
+ | includedServices | Array<Modules.BLE.Service> | both | A list of included services discovered in this se… |
513
+ | isPrimary | Boolean | both | A Boolean value that indicates whether the type o… |
514
+ | peripheral | Modules.BLE.Peripheral | ios | The peripheral to which this service belongs. |
515
+ | uuid | String | both | The Bluetooth-specific UUID of the attribute. |
516
+
517
+
518
+
519
+
520
+ ---
521
+
522
+ ## Modules.Bluetooth
523
+ > Allows a Titanium application to use Bluetooth service.
524
+ > Extends Ti.Module
525
+ > Platforms: android
526
+ > Type: module
527
+
528
+ ### Properties (unique: 4/18)
529
+ | Property | Type | Platform | Description |
530
+ |----------|------|----------|-------------|
531
+ | address | String | android | The hardware address of the local Bluetooth adapt… |
532
+ | name | String | android | Friendly name of the local Bluetooth adapter. |
533
+ | scanMode | Number | android | The current Bluetooth scan mode of the local Blue… |
534
+ | state | Number | android | The current state of the local Bluetooth adapter. |
535
+
536
+ ### Constants (11)
537
+ - **DEVICE_TYPE_\***: DEVICE_TYPE_CLASSIC, DEVICE_TYPE_DUAL, DEVICE_TYPE_LE, DEVICE_TYPE_UNKNOWN
538
+ - **SCAN_MODE_\***: SCAN_MODE_CONNECTABLE, SCAN_MODE_NONE
539
+ - **SCAN_MODE_CONNECTABLE_\***: SCAN_MODE_CONNECTABLE_DISCOVERABLE
540
+ - **STATE_\***: STATE_OFF, STATE_ON
541
+ - **STATE_TURNING_\***: STATE_TURNING_OFF, STATE_TURNING_ON
542
+
543
+
544
+ ### Methods (17)
545
+ | Method | Returns | Platform | Description |
546
+ |--------|---------|----------|-------------|
547
+ | cancelDiscovery(—) | Boolean | android | Cancels the current device discovery process. |
548
+ | checkBluetoothAddress(address) | Boolean | android | Validates a Bluetooth address, such as "00:43:A8:… |
549
+ | createServerSocket(params) | Modules.Bluetooth.BluetoothServerSocket | android | Creates an object of [BluetoothServerSocket](Modu… |
550
+ | disable(—) | Boolean | android | Disables the local Bluetooth adapter. |
551
+ | enable(—) | Boolean | android | Enables the local Bluetooth adapter. |
552
+ | ensureDiscoverable(interval) | void | android | Make the local device discoverable to other devic… |
553
+ | getName(—) | String | android | Gets the friendly Bluetooth name of the local Blu… |
554
+ | getPairedDevices(—) | PairedDevicesType | android | This method is use to get the devices that are pa… |
555
+ | getRemoteDevice(address) | Modules.Bluetooth.BluetoothDevice | android | Get a [BluetoothDevice](Modules.Bluetooth.Bluetoo… |
556
+ | isDiscovering(—) | Boolean | android | Determines whether the local Bluetooth adapter is… |
557
+ | isEnabled(—) | Boolean | android | Determines if Bluetooth is currently enabled and … |
558
+ | isRequiredPermissionsGranted(—) | Boolean | android | Determines whether the required permissions are g… |
559
+ | isSupported(—) | Boolean | android | Determines whether Bluetooth is supported on the … |
560
+ | requestAccessFinePermission(callback) | Promise<Titanium.Android.RequestPermissionAccessResult> | android | Displays a dialog requesting location permission … |
561
+ | requestPermissions(callback) | Promise<Titanium.Android.RequestPermissionAccessResult> | android | Displays a dialog requesting all permissions need… |
562
+ | setName(name) | void | android | Sets the friendly Bluetooth name of the local Blu… |
563
+ | startDiscovery(—) | Boolean | android | Starts the remote device discovery process. |
564
+
565
+ ### Events (4)
566
+ | Event | Platform | Description |
567
+ |-------|----------|-------------|
568
+ | deviceFound | android | Fired when the local Bluetooth adapter discovers a device. |
569
+ | discoveryFinished | android | Fired when the local Bluetooth adapter finished discovery. |
570
+ | discoveryStarted | android | Fired when the local Bluetooth adapter started discovery. |
571
+ | stateChanged | android | Fired when the state of the local Bluetooth adapter changes. |
572
+
573
+ ---
574
+
575
+ ## Modules.Bluetooth.BluetoothDevice
576
+ > Represents a remote bluetooth device.
577
+ > Extends Ti.Proxy
578
+ > Platforms: android
579
+
580
+ ### Properties (unique: 4/7)
581
+ | Property | Type | Platform | Description |
582
+ |----------|------|----------|-------------|
583
+ | address | String | android | Address of the remote Bluetooth device. |
584
+ | name | String | android | Name of the remote Bluetooth device. |
585
+ | type | Number | android | Type of the remote Bluetooth device. |
586
+ | uUIDs | Array<String> | android | The supported UUIDs of the remote device. |
587
+
588
+
589
+ ### Methods (2)
590
+ | Method | Returns | Platform | Description |
591
+ |--------|---------|----------|-------------|
592
+ | fetchUUIDs(—) | Boolean | android | Perform a service discovery on the remote device … |
593
+ | createSocket(uuid, secure) | Modules.Bluetooth.BluetoothSocket | android | Creates an RFCOMM Bluetooth socket. |
594
+
595
+ ### Events (1)
596
+ | Event | Platform | Description |
597
+ |-------|----------|-------------|
598
+ | fetchedUUIDs | android | Fired when the UUIDs of the remote device are received using SDP. |
599
+
600
+ ---
601
+
602
+ ## Modules.Bluetooth.BluetoothServerSocket
603
+ > A listening Bluetooth socket.
604
+ > Extends Ti.Proxy
605
+ > Platforms: android
606
+
607
+
608
+ ### Methods (4)
609
+ | Method | Returns | Platform | Description |
610
+ |--------|---------|----------|-------------|
611
+ | close(—) | void | android | Closes the server socket. |
612
+ | isAccepting(—) | Boolean | android | Determines whether the server socket is currently… |
613
+ | startAccept(keepListening) | void | android | Inform the server socket to start accepting incom… |
614
+ | stopAccept(—) | void | android | Inform the server socket to stop accepting incomi… |
615
+
616
+ ### Events (2)
617
+ | Event | Platform | Description |
618
+ |-------|----------|-------------|
619
+ | connectionReceived | android | Fired when the server socket receives an incoming connection. |
620
+ | error | android | Fired when a socket operation fails. |
621
+
622
+ ---
623
+
624
+ ## Modules.Bluetooth.BluetoothSocket
625
+ > A connected or connecting Bluetooth socket.
626
+ > Extends Ti.Proxy
627
+ > Platforms: android
628
+
629
+ ### Properties (unique: 1/4)
630
+ | Property | Type | Platform | Description |
631
+ |----------|------|----------|-------------|
632
+ | readBufferSize | Number | android | The size of the read buffer in bytes. By default,… |
633
+
634
+
635
+ ### Methods (9)
636
+ | Method | Returns | Platform | Description |
637
+ |--------|---------|----------|-------------|
638
+ | connect(—) | void | android | Starts the connection to the remote device. |
639
+ | isConnected(—) | Boolean | android | Determines whether there is an active connection … |
640
+ | isConnecting(—) | Boolean | android | Determines whether there is an ongoing connection… |
641
+ | cancelConnect(—) | void | android | Drops the ongoing connection attempt if in progre… |
642
+ | close(—) | void | android | Closes the socket. |
643
+ | getReadBufferSize(—) | Number | android | Get the size of the read buffer in bytes. |
644
+ | getRemoteDevice(—) | Modules.Bluetooth.BluetoothDevice | android | Get the remote device this socket is associated w… |
645
+ | setReadBufferSize(newReadBufferSize) | void | android | Sets the size of the read buffer in bytes. |
646
+ | write(buffer) | void | android | Sends an array of bytes over the socket. |
647
+
648
+ ### Events (4)
649
+ | Event | Platform | Description |
650
+ |-------|----------|-------------|
651
+ | connected | android | Fired when the connection through the socket is established. |
652
+ | disconnected | android | Fired when connection to the socket is lost. |
653
+ | error | android | Fired when an operation fails. |
654
+ | receivedData | android | Fired when data is received on this socket. |
655
+
656
+ ---
657
+