@maccesar/titools 2.10.0 → 3.1.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.
- package/AGENTS-VERCEL-RESEARCH.md +23 -12
- package/README.md +81 -182
- package/agents/ti-pro.md +8 -14
- package/lib/cleanup.js +13 -0
- package/lib/commands/skills.js +2 -1
- package/lib/commands/update.js +4 -1
- package/lib/config.js +9 -11
- package/lib/platform.js +1 -1
- package/package.json +2 -3
- package/skills/purgetss/SKILL.md +12 -0
- package/skills/purgetss/references/animation-advanced.md +0 -9
- package/skills/purgetss/references/app-branding.md +20 -0
- package/skills/purgetss/references/appearance-module.md +85 -27
- package/skills/purgetss/references/apply-directive.md +60 -0
- package/skills/purgetss/references/arbitrary-values.md +41 -0
- package/skills/purgetss/references/cli-commands.md +52 -17
- package/skills/purgetss/references/custom-rules.md +36 -19
- package/skills/purgetss/references/customization-deep-dive.md +37 -15
- package/skills/purgetss/references/grid-layout.md +45 -26
- package/skills/purgetss/references/icon-fonts.md +27 -25
- package/skills/purgetss/references/installation-setup.md +28 -2
- package/skills/purgetss/references/ios-large-titles.md +31 -15
- package/skills/purgetss/references/multi-density-images.md +57 -0
- package/skills/purgetss/references/opacity-modifier.md +11 -2
- package/skills/purgetss/references/semantic-colors.md +44 -1
- package/skills/purgetss/references/tikit-components.md +1 -3
- package/skills/alloy-guides/SKILL.md +0 -190
- package/skills/alloy-guides/references/CLI_TASKS.md +0 -233
- package/skills/alloy-guides/references/CONCEPTS.md +0 -171
- package/skills/alloy-guides/references/CONTROLLERS.md +0 -279
- package/skills/alloy-guides/references/MODELS.md +0 -1214
- package/skills/alloy-guides/references/PURGETSS.md +0 -46
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +0 -235
- package/skills/alloy-guides/references/VIEWS_STYLES.md +0 -375
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
- package/skills/alloy-guides/references/VIEWS_XML.md +0 -581
- package/skills/alloy-guides/references/WIDGETS.md +0 -160
- package/skills/alloy-howtos/SKILL.md +0 -181
- package/skills/alloy-howtos/references/best_practices.md +0 -121
- package/skills/alloy-howtos/references/cli_reference.md +0 -230
- package/skills/alloy-howtos/references/config_files.md +0 -158
- package/skills/alloy-howtos/references/custom_tags.md +0 -148
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +0 -78
- package/skills/alloy-howtos/references/samples.md +0 -156
- package/skills/ti-api/SKILL.md +0 -109
- package/skills/ti-api/references/api-android.md +0 -675
- package/skills/ti-api/references/api-app-platform.md +0 -636
- package/skills/ti-api/references/api-core.md +0 -764
- package/skills/ti-api/references/api-data-network.md +0 -641
- package/skills/ti-api/references/api-media.md +0 -655
- package/skills/ti-api/references/api-modules-ble-bluetooth.md +0 -657
- package/skills/ti-api/references/api-modules-coremotion-urlsession.md +0 -411
- package/skills/ti-api/references/api-modules-map.md +0 -632
- package/skills/ti-api/references/api-modules-nfc.md +0 -725
- package/skills/ti-api/references/api-modules-social-misc.md +0 -526
- package/skills/ti-api/references/api-services.md +0 -700
- package/skills/ti-api/references/api-ui-android.md +0 -499
- package/skills/ti-api/references/api-ui-extras.md +0 -702
- package/skills/ti-api/references/api-ui-ios-animator.md +0 -378
- package/skills/ti-api/references/api-ui-ios.md +0 -756
- package/skills/ti-api/references/api-ui-lists.md +0 -581
- package/skills/ti-api/references/api-ui-text-input.md +0 -607
- package/skills/ti-api/references/api-ui-views.md +0 -572
- package/skills/ti-api/references/api-ui-windows-navigation.md +0 -676
- package/skills/ti-api/references/api-xml-global.md +0 -743
- package/skills/ti-guides/SKILL.md +0 -75
- package/skills/ti-guides/references/advanced-data-and-images.md +0 -155
- package/skills/ti-guides/references/android-manifest.md +0 -97
- package/skills/ti-guides/references/app-distribution.md +0 -373
- package/skills/ti-guides/references/application-frameworks.md +0 -366
- package/skills/ti-guides/references/cli-reference.md +0 -700
- package/skills/ti-guides/references/coding-best-practices.md +0 -150
- package/skills/ti-guides/references/commonjs-advanced.md +0 -279
- package/skills/ti-guides/references/hello-world.md +0 -99
- package/skills/ti-guides/references/hyperloop-native-access.md +0 -458
- package/skills/ti-guides/references/javascript-primer.md +0 -402
- package/skills/ti-guides/references/reserved-words.md +0 -36
- package/skills/ti-guides/references/resources.md +0 -172
- package/skills/ti-guides/references/style-and-conventions.md +0 -104
- package/skills/ti-guides/references/tiapp-config.md +0 -655
- package/skills/ti-howtos/SKILL.md +0 -143
- package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -609
- package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
- package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
- package/skills/ti-howtos/references/cross-platform-development.md +0 -358
- package/skills/ti-howtos/references/debugging-profiling.md +0 -473
- package/skills/ti-howtos/references/extending-titanium.md +0 -684
- package/skills/ti-howtos/references/google-maps-v2.md +0 -172
- package/skills/ti-howtos/references/ios-map-kit.md +0 -149
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -595
- package/skills/ti-howtos/references/local-data-sources.md +0 -310
- package/skills/ti-howtos/references/location-and-maps.md +0 -267
- package/skills/ti-howtos/references/media-apis.md +0 -268
- package/skills/ti-howtos/references/notification-services.md +0 -539
- package/skills/ti-howtos/references/remote-data-sources.md +0 -339
- package/skills/ti-howtos/references/tutorials.md +0 -552
- package/skills/ti-howtos/references/using-modules.md +0 -182
- package/skills/ti-howtos/references/web-content-integration.md +0 -288
- package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -125
|
@@ -1,700 +0,0 @@
|
|
|
1
|
-
# Ti.Geolocation, Ti.Contacts, Ti.Calendar & Ti.WatchSession API Reference
|
|
2
|
-
|
|
3
|
-
## Ti.Calendar
|
|
4
|
-
> The Calendar module provides an API for accessing the native calendar functionality.
|
|
5
|
-
> Extends Ti.Module
|
|
6
|
-
> Platforms: both
|
|
7
|
-
> Type: module
|
|
8
|
-
|
|
9
|
-
This module supports retrieving information about existing events and creating new events.
|
|
10
|
-
Modifying or deleting existing events and creating recurring events are only supported on iOS.
|
|
11
|
-
|
|
12
|
-
### Android
|
|
13
|
-
On Android, calendar permissions must be explicitly configured in `tiapp.xml` in order to access the
|
|
14
|
-
calendar and you have to use [requestCalendarPermissions](Titanium.Calendar.requestCalendarPermissions)
|
|
15
|
-
to request runtime permissions.
|
|
16
|
-
|
|
17
|
-
``` xml
|
|
18
|
-
|
|
19
|
-
### Properties (unique: 6/72)
|
|
20
|
-
| Property | Type | Default | Platform | Description |
|
|
21
|
-
|----------|------|---------|----------|-------------|
|
|
22
|
-
| calendarAuthorization | Number | — | ios | Returns an authorization constant indicating if the application has access to t… |
|
|
23
|
-
| allAlerts | Array<Titanium.Calendar.Alert> | — | android | All alerts in selected calendars. |
|
|
24
|
-
| allCalendars | Array<Titanium.Calendar.Calendar> | — | both | All calendars known to the native calendar app. |
|
|
25
|
-
| allEditableCalendars | Array<Titanium.Calendar.Calendar> | — | ios | All calendars known to the native calendar app that can add, edit, and delete i… |
|
|
26
|
-
| selectableCalendars | Array<Titanium.Calendar.Calendar> | — | android | All calendars selected within the native calendar app, which may be a subset of… |
|
|
27
|
-
| defaultCalendar | Ti.Calendar.Calendar | — | both | Calendar that events are added to by default, as specified by user settings. |
|
|
28
|
-
|
|
29
|
-
### Constants (63)
|
|
30
|
-
- **ATTENDEE_ROLE_\***: ATTENDEE_ROLE_UNKNOWN, ATTENDEE_ROLE_OPTIONAL, ATTENDEE_ROLE_REQUIRED, ATTENDEE_ROLE_CHAIR
|
|
31
|
-
- **ATTENDEE_ROLE_NON_\***: ATTENDEE_ROLE_NON_PARTICIPANT
|
|
32
|
-
- **ATTENDEE_STATUS_\***: ATTENDEE_STATUS_UNKNOWN, ATTENDEE_STATUS_PENDING, ATTENDEE_STATUS_ACCEPTED, ATTENDEE_STATUS_DECLINED, ATTENDEE_STATUS_TENTATIVE, ATTENDEE_STATUS_INVITED, ATTENDEE_STATUS_NONE, ATTENDEE_STATUS_DELEGATED
|
|
33
|
-
- **ATTENDEE_STATUS_IN_\***: ATTENDEE_STATUS_IN_PROCESS
|
|
34
|
-
- **ATTENDEE_TYPE_\***: ATTENDEE_TYPE_UNKNOWN, ATTENDEE_TYPE_PERSON, ATTENDEE_TYPE_ROOM, ATTENDEE_TYPE_RESOURCE, ATTENDEE_TYPE_NONE, ATTENDEE_TYPE_REQUIRED, ATTENDEE_TYPE_GROUP
|
|
35
|
-
- **AUTHORIZATION_\***: AUTHORIZATION_AUTHORIZED, AUTHORIZATION_DENIED, AUTHORIZATION_RESTRICTED, AUTHORIZATION_UNKNOWN
|
|
36
|
-
- **AVAILABILITY_\***: AVAILABILITY_NOTSUPPORTED, AVAILABILITY_BUSY, AVAILABILITY_FREE, AVAILABILITY_TENTATIVE, AVAILABILITY_UNAVAILABLE
|
|
37
|
-
- **METHOD_\***: METHOD_ALERT, METHOD_DEFAULT, METHOD_EMAIL, METHOD_SMS
|
|
38
|
-
- **RECURRENCEFREQUENCY_\***: RECURRENCEFREQUENCY_DAILY, RECURRENCEFREQUENCY_WEEKLY, RECURRENCEFREQUENCY_MONTHLY, RECURRENCEFREQUENCY_YEARLY
|
|
39
|
-
- **RELATIONSHIP_\***: RELATIONSHIP_ATTENDEE, RELATIONSHIP_NONE, RELATIONSHIP_ORGANIZER, RELATIONSHIP_PERFORMER, RELATIONSHIP_SPEAKER, RELATIONSHIP_UNKNOWN
|
|
40
|
-
- **SOURCE_TYPE_\***: SOURCE_TYPE_LOCAL, SOURCE_TYPE_EXCHANGE, SOURCE_TYPE_CALDAV, SOURCE_TYPE_MOBILEME, SOURCE_TYPE_SUBSCRIBED, SOURCE_TYPE_BIRTHDAYS
|
|
41
|
-
- **SPAN_\***: SPAN_THISEVENT, SPAN_FUTUREEVENTS
|
|
42
|
-
- **STATE_\***: STATE_DISMISSED, STATE_FIRED, STATE_SCHEDULED
|
|
43
|
-
- **STATUS_\***: STATUS_NONE, STATUS_CANCELED, STATUS_CONFIRMED, STATUS_TENTATIVE
|
|
44
|
-
- **VISIBILITY_\***: VISIBILITY_CONFIDENTIAL, VISIBILITY_DEFAULT, VISIBILITY_PRIVATE, VISIBILITY_PUBLIC
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### Methods (3)
|
|
48
|
-
| Method | Returns | Platform | Description |
|
|
49
|
-
|--------|---------|----------|-------------|
|
|
50
|
-
| getCalendarById(id) | Ti.Calendar.Calendar | both | Gets the calendar with the specified identifier. |
|
|
51
|
-
| hasCalendarPermissions(—) | Boolean | both | Returns `true` if the app has calendar access. |
|
|
52
|
-
| requestCalendarPermissions(callback) | Promise<EventsAuthorizationResponse> | both | Requests for calendar access. |
|
|
53
|
-
|
|
54
|
-
### Events (1)
|
|
55
|
-
| Event | Platform | Description |
|
|
56
|
-
|-------|----------|-------------|
|
|
57
|
-
| change | ios | Fired when the database backing the EventKit module is modified. |
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Ti.Calendar.Alert
|
|
62
|
-
> An object that represents a single alert for an event in an calendar.
|
|
63
|
-
> Extends Ti.Proxy
|
|
64
|
-
> Platforms: both
|
|
65
|
-
|
|
66
|
-
### Properties (unique: 9/12)
|
|
67
|
-
| Property | Type | Default | Platform | Description |
|
|
68
|
-
|----------|------|---------|----------|-------------|
|
|
69
|
-
| absoluteDate | Date | — | ios | The absolute date for the alarm. |
|
|
70
|
-
| relativeOffset | Number | — | ios | The offset from the start of an event, at which the alarm fires. |
|
|
71
|
-
| alarmTime | Date | — | android | Date/time at which this alert alarm is set to trigger. |
|
|
72
|
-
| begin | Date | — | android | Start date/time for the corresponding event. |
|
|
73
|
-
| end | Date | — | android | End date/time for the corresponding event. |
|
|
74
|
-
| eventId | Number | — | both | Identifier of the event for which this alert is set. |
|
|
75
|
-
| id | String | — | android | Identifier of this alert. |
|
|
76
|
-
| minutes | Number | — | android | Reminder notice period in minutes, that determines how long prior to the event … |
|
|
77
|
-
| state | Number | — | android | The current state of the alert. |
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Ti.Calendar.Attendee
|
|
85
|
-
> An object that represents a single attendee of an event.
|
|
86
|
-
> Extends Ti.Proxy
|
|
87
|
-
> Platforms: ios
|
|
88
|
-
|
|
89
|
-
The API supports retrieving information about the attendee of an event.
|
|
90
|
-
|
|
91
|
-
### Properties (unique: 6/8)
|
|
92
|
-
| Property | Type | Default | Platform | Description |
|
|
93
|
-
|----------|------|---------|----------|-------------|
|
|
94
|
-
| isOrganizer | Boolean | — | ios | Indicates whether this attendee is the event organizer. |
|
|
95
|
-
| name | String | — | ios | The attendee name. |
|
|
96
|
-
| email | String | — | ios | The attendee email. |
|
|
97
|
-
| role | Number | — | ios | The role of the attendee. |
|
|
98
|
-
| type | Number | — | ios | The type of the attendee. |
|
|
99
|
-
| status | Number | — | ios | The status of the attendee. |
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Ti.Calendar.Calendar
|
|
107
|
-
> An object that represents a single calendar.
|
|
108
|
-
> Extends Ti.Proxy
|
|
109
|
-
> Platforms: both
|
|
110
|
-
|
|
111
|
-
### Properties (unique: 7/10)
|
|
112
|
-
| Property | Type | Default | Platform | Description |
|
|
113
|
-
|----------|------|---------|----------|-------------|
|
|
114
|
-
| hidden | Boolean | — | both | Indicates whether this calendar can be edited or deleted. |
|
|
115
|
-
| id | String | — | both | Identifier of this calendar. |
|
|
116
|
-
| name | String | — | both | Display name of this calendar. |
|
|
117
|
-
| selected | Boolean | — | android | Indicates whether the calendar is selected. |
|
|
118
|
-
| sourceTitle | String | — | ios | Displays the source title. |
|
|
119
|
-
| sourceType | Number | — | ios | Displays the source type. |
|
|
120
|
-
| sourceIdentifier | String | — | ios | Displays the source identifier. |
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### Methods (9)
|
|
124
|
-
| Method | Returns | Platform | Description |
|
|
125
|
-
|--------|---------|----------|-------------|
|
|
126
|
-
| createEvent(properties) | Ti.Calendar.Event | both | Creates an event in this calendar. |
|
|
127
|
-
| createEvents(propertiesArray) | Array<Titanium.Calendar.Event> | android | Creates multiple events at once in this calendar. |
|
|
128
|
-
| getEventById(id) | Ti.Calendar.Event | both | Gets the event with the specified identifier. |
|
|
129
|
-
| getEventsById(ids) | Array<Titanium.Calendar.Event> | android | Gets multiple events with their specified identifier(s). |
|
|
130
|
-
| deleteEvents(ids) | Number | android | Deletes multiple events with their specified identifier(s). |
|
|
131
|
-
| getEventsBetweenDates(date1, date2) | Array<Titanium.Calendar.Event> | both | Gets events that occur between two dates. |
|
|
132
|
-
| getEventsInDate(year, month, day) | Array<Titanium.Calendar.Event> | both | Gets events that occur on a specified date. |
|
|
133
|
-
| getEventsInMonth(year, month) | Array<Titanium.Calendar.Event> | both | Gets events that occur during a specified month. |
|
|
134
|
-
| getEventsInYear(year) | Array<Titanium.Calendar.Event> | both | Gets all events that occur during a specified year. |
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Ti.Calendar.Event
|
|
140
|
-
> An object that represents a single event in a calendar.
|
|
141
|
-
> Extends Ti.Proxy
|
|
142
|
-
> Platforms: both
|
|
143
|
-
|
|
144
|
-
The API supports retrieving information about existing events and creating new events.
|
|
145
|
-
On iOS, existing events can be modified or deleted. On Android, only recurrence rules
|
|
146
|
-
can be modified.
|
|
147
|
-
|
|
148
|
-
See <Titanium.Calendar> for examples of retrieving event information and creating events.
|
|
149
|
-
|
|
150
|
-
### Properties (unique: 18/21)
|
|
151
|
-
| Property | Type | Default | Platform | Description |
|
|
152
|
-
|----------|------|---------|----------|-------------|
|
|
153
|
-
| alerts | Array<Titanium.Calendar.Alert> | — | both | Alarms associated with the calendar item, as an array of <Titanium.Calendar.Ale… |
|
|
154
|
-
| allDay | Boolean | false | both | Indicates whether this event is all day. |
|
|
155
|
-
| begin | Date | — | both | Start date/time of this event. |
|
|
156
|
-
| notes | String | — | ios | Notes for this event. |
|
|
157
|
-
| description | String | — | android | Description of this event. |
|
|
158
|
-
| end | Date | — | both | End date/time of this event. |
|
|
159
|
-
| extendedProperties | Dictionary | — | android | Extended properties of this event. |
|
|
160
|
-
| hasAlarm | Boolean | — | both | Indicates whether an alarm is scheduled for this event. |
|
|
161
|
-
| id | String | — | both | Identifier of this event. |
|
|
162
|
-
| location | String | — | both | Location of this event. |
|
|
163
|
-
| reminders | Array<Titanium.Calendar.Reminder> | — | android | Existing reminders for this event. |
|
|
164
|
-
| status | Number | — | both | Status of this event. |
|
|
165
|
-
| availability | Number | — | ios | Availability of this event. |
|
|
166
|
-
| isDetached | Boolean | — | ios | Boolean value that indicates whether an event is a detached instance of a repea… |
|
|
167
|
-
| title | String | — | both | Title of this event. |
|
|
168
|
-
| recurrenceRules | Array<Titanium.Calendar.RecurrenceRule> | — | both | The recurrence rules for the calendar item. |
|
|
169
|
-
| visibility | Number | — | android | Visibility of this event. |
|
|
170
|
-
| attendees | Array<Titanium.Calendar.Attendee> | — | ios | The list of event attendees. This list will be empty if the event has no attend… |
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
### Methods (10)
|
|
174
|
-
| Method | Returns | Platform | Description |
|
|
175
|
-
|--------|---------|----------|-------------|
|
|
176
|
-
| createAlert(data) | Ti.Calendar.Alert | both | Creates an alert for this event. |
|
|
177
|
-
| createReminder(data) | Ti.Calendar.Reminder | android | Creates a reminder for this event. |
|
|
178
|
-
| getExtendedProperty(name) | String | android | Gets the value of the specified extended property. |
|
|
179
|
-
| setExtendedProperty(name, value) | void | android | Sets the value of the specified extended property. |
|
|
180
|
-
| createRecurrenceRule(data) | Ti.Calendar.RecurrenceRule | both | Creates an recurrence pattern for a recurring event. All of the properties for … |
|
|
181
|
-
| save(span) | Boolean | both | Saves changes to an event permanently. |
|
|
182
|
-
| remove(span) | Boolean | both | Removes an event from the calendar. |
|
|
183
|
-
| refresh(—) | Boolean | ios | Updates the event's data with the current information in the Calendar database. |
|
|
184
|
-
| addRecurrenceRule(rule) | void | ios | Adds a recurrence rule to the recurrence rule array. |
|
|
185
|
-
| removeRecurrenceRule(rule) | void | ios | Removes a recurrence rule to the recurrence rule array. |
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
### Related Types
|
|
189
|
-
|
|
190
|
-
#### Dictionary
|
|
191
|
-
> Plain JavaScript object.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Ti.Calendar.RecurrenceRule
|
|
196
|
-
> An object that is used to describe the recurrence pattern for a recurring event.
|
|
197
|
-
> Extends Ti.Proxy
|
|
198
|
-
> Platforms: both
|
|
199
|
-
|
|
200
|
-
On Android there is no option to have multiple recurrence rules set for the same event.
|
|
201
|
-
Android always uses only the first element in the array passed to [recurrenceRules](Titanium.Calendar.Event.recurrenceRules).
|
|
202
|
-
|
|
203
|
-
In case of having [daysOfTheWeek](Titanium.Calendar.RecurrenceRule.daysOfTheWeek) and [daysOfTheMonth](Titanium.Calendar.RecurrenceRule.daysOfTheWeek)
|
|
204
|
-
for an event with a recurrence rule of type [RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY) only
|
|
205
|
-
[daysOfTheWeek] will be used.
|
|
206
|
-
|
|
207
|
-
### Properties (unique: 10/13)
|
|
208
|
-
| Property | Type | Default | Platform | Description |
|
|
209
|
-
|----------|------|---------|----------|-------------|
|
|
210
|
-
| calendarID | String | — | both | Identifier for the recurrence rule's calendar. |
|
|
211
|
-
| frequency | Number | — | both | Frequency of the recurrence rule. |
|
|
212
|
-
| interval | Number | 1 | both | The interval between instances of this recurrence. For example, a weekly recurr… |
|
|
213
|
-
| daysOfTheWeek | Array<daysOfTheWeekDictionary> | — | both | The days of the week that the event occurs, as an array of objects `daysOfWeek`… |
|
|
214
|
-
| daysOfTheMonth | Array<Number> | — | both | The days of the month that the event occurs, as an array of number objects. Val… |
|
|
215
|
-
| monthsOfTheYear | Array<Number> | — | both | The months of the year that the event occurs, as an array of Number objects. Va… |
|
|
216
|
-
| weeksOfTheYear | Array<Number> | — | both | The weeks of the year that the event occurs, as an array of number objects. Val… |
|
|
217
|
-
| daysOfTheYear | Array<Number> | — | both | The days of the year that the event occurs, as an array of number objects. Valu… |
|
|
218
|
-
| setPositions | Array<Number> | — | ios | An array of ordinal numbers that filters which recurrences to include in the re… |
|
|
219
|
-
| end | recurrenceEndDictionary | — | both | End of a recurrence rule. |
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
### Related Types
|
|
225
|
-
|
|
226
|
-
#### recurrenceEndDictionary
|
|
227
|
-
> Dictionary containing either `endDate` or `occurrenceCount` property.
|
|
228
|
-
|
|
229
|
-
| Property | Type | Description |
|
|
230
|
-
|----------|------|-------------|
|
|
231
|
-
| endDate | Date | End date of the recurrence end, or undefined if the recurrence end is count-bas… |
|
|
232
|
-
| occurrenceCount | Number | Occurrence count of the recurrence end, or 0 if the recurrence end is date-base… |
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## Ti.Calendar.Reminder
|
|
237
|
-
> An object that represents a single reminder for an event in a calendar.
|
|
238
|
-
> Extends Ti.Proxy
|
|
239
|
-
> Platforms: android
|
|
240
|
-
|
|
241
|
-
Reminders should be created using the <Titanium.Calendar.Event.createReminder> method
|
|
242
|
-
rather than directly.
|
|
243
|
-
|
|
244
|
-
See <Titanium.Calendar> for examples of retrieving reminder information and creating
|
|
245
|
-
reminders for events.
|
|
246
|
-
|
|
247
|
-
### Properties (unique: 3/6)
|
|
248
|
-
| Property | Type | Default | Platform | Description |
|
|
249
|
-
|----------|------|---------|----------|-------------|
|
|
250
|
-
| id | String | — | android | Identifier of this reminder. |
|
|
251
|
-
| method | Number | — | android | Method by which this reminder will be delivered. |
|
|
252
|
-
| minutes | Number | — | android | Reminder notice period in minutes, that determines how long prior to the event … |
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Ti.Contacts
|
|
260
|
-
> The top-level Contacts module, used for accessing and modifying the system contacts address book.
|
|
261
|
-
> Extends Ti.Module
|
|
262
|
-
> Platforms: both
|
|
263
|
-
> Type: module
|
|
264
|
-
|
|
265
|
-
See examples for more information.
|
|
266
|
-
|
|
267
|
-
### iOS Platform Notes
|
|
268
|
-
|
|
269
|
-
On iOS, the contacts database may be modified by an external application, causing any `Person` or
|
|
270
|
-
`Group` objects you've retrieved to be out of sync with the database. The IDs of these objects are
|
|
271
|
-
not guaranteed to remain the same, so updating an object when it is out of sync may have
|
|
272
|
-
unpredictable results.
|
|
273
|
-
|
|
274
|
-
To avoid this, listen for the [reload](Titanium.Contacts.reload) event. When you receive a
|
|
275
|
-
`reload` event, you should assume that any existing `Person` or `Group` objects are invalid and
|
|
276
|
-
reload them from the `Contacts` module before modifying them.
|
|
277
|
-
|
|
278
|
-
See the examples for a sample use of the `reload` event.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
*(See full overview in titanium-docs)*
|
|
282
|
-
|
|
283
|
-
### Properties (unique: 2/12)
|
|
284
|
-
| Property | Type | Default | Platform | Description |
|
|
285
|
-
|----------|------|---------|----------|-------------|
|
|
286
|
-
| includeNote | Boolean | true | ios | A boolean value that indicates whether to fetch the notes stored in contacts or… |
|
|
287
|
-
| contactsAuthorization | Number | — | both | Returns an authorization constant indicating if the application has access to t… |
|
|
288
|
-
|
|
289
|
-
### Constants (7)
|
|
290
|
-
- **AUTHORIZATION_\***: AUTHORIZATION_AUTHORIZED, AUTHORIZATION_DENIED, AUTHORIZATION_UNKNOWN
|
|
291
|
-
- **CONTACTS_KIND_\***: CONTACTS_KIND_ORGANIZATION, CONTACTS_KIND_PERSON
|
|
292
|
-
- **CONTACTS_SORT_FIRST_\***: CONTACTS_SORT_FIRST_NAME
|
|
293
|
-
- **CONTACTS_SORT_LAST_\***: CONTACTS_SORT_LAST_NAME
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
### Methods (13)
|
|
297
|
-
| Method | Returns | Platform | Description |
|
|
298
|
-
|--------|---------|----------|-------------|
|
|
299
|
-
| createGroup(parameters) | Ti.Contacts.Group | ios | Creates and returns an instance of <Titanium.Contacts.Group>. |
|
|
300
|
-
| createPerson(parameters) | Ti.Contacts.Person | both | Creates and returns an instance of <Titanium.Contacts.Person>, and commits all … |
|
|
301
|
-
| getAllGroups(—) | Array<Titanium.Contacts.Group> | ios | Gets all groups. |
|
|
302
|
-
| getAllPeople(limit) | Array<Titanium.Contacts.Person> | both | Gets all people, unless a limit is specified. |
|
|
303
|
-
| getGroupByIdentifier(id) | Ti.Contacts.Group | ios | Gets the group with the specified identifier. |
|
|
304
|
-
| getPeopleWithName(name) | Array<Titanium.Contacts.Person> | both | Gets people with a `firstName`, `middleName` or `lastName` field, or a combinat… |
|
|
305
|
-
| getPersonByIdentifier(id) | Ti.Contacts.Person | both | Gets the person with the specified identifier. |
|
|
306
|
-
| removeGroup(group) | void | ios | Removes a group from the address book. |
|
|
307
|
-
| removePerson(person) | void | both | Removes a contact from the address book. |
|
|
308
|
-
| save(contacts) | void | both | Commits all pending changes to the underlying contacts database. |
|
|
309
|
-
| showContacts(params) | void | both | Displays a picker that allows a person to be selected. |
|
|
310
|
-
| hasContactsPermissions(—) | Boolean | both | Returns `true` if the app has contacts access. |
|
|
311
|
-
| requestContactsPermissions(callback) | Promise<ContactsAuthorizationResponse> | both | Requests for contacts access. |
|
|
312
|
-
|
|
313
|
-
### Events (1)
|
|
314
|
-
| Event | Platform | Description |
|
|
315
|
-
|-------|----------|-------------|
|
|
316
|
-
| reload | ios | Fired when the database backing the contacts module is modified externally. |
|
|
317
|
-
|
|
318
|
-
### Related Types
|
|
319
|
-
|
|
320
|
-
#### showContactsParams
|
|
321
|
-
> Dictionary of options for the <Titanium.Contacts.showContacts> method.
|
|
322
|
-
|
|
323
|
-
| Property | Type | Description |
|
|
324
|
-
|----------|------|-------------|
|
|
325
|
-
| animated | Boolean | Determines whether to animate the show/hide of the contacts picker (iPhone, iPa… |
|
|
326
|
-
| fields | Array<String> | Field names to show when selecting properties. By default, shows all available. |
|
|
327
|
-
| cancel | Callback<Object> | Function to call when selection is canceled. |
|
|
328
|
-
| selectedPerson | Callback<Object> | Function to call when a person is selected. Must not be used with `selectedProp… |
|
|
329
|
-
| selectedProperty | Callback<Object> | Function to call when a property is selected. Must not be used with `selectedPe… |
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Ti.Contacts.Group
|
|
334
|
-
> An object which represents a group in the system contacts address book.
|
|
335
|
-
> Extends Ti.Proxy
|
|
336
|
-
> Platforms: ios
|
|
337
|
-
|
|
338
|
-
See examples in <Titanium.Contacts> for more information.
|
|
339
|
-
|
|
340
|
-
These APIs are unavailable on macOS if the app is built on a version of Xcode < 12.
|
|
341
|
-
|
|
342
|
-
### Properties (unique: 2/4)
|
|
343
|
-
| Property | Type | Default | Platform | Description |
|
|
344
|
-
|----------|------|---------|----------|-------------|
|
|
345
|
-
| name | String | — | ios | Name of this group. |
|
|
346
|
-
| identifier | String | — | ios | Identifier of the group. |
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
### Methods (4)
|
|
350
|
-
| Method | Returns | Platform | Description |
|
|
351
|
-
|--------|---------|----------|-------------|
|
|
352
|
-
| add(person) | void | ios | Adds a person to this group. |
|
|
353
|
-
| members(—) | Array<Titanium.Contacts.Person> | ios | Gets people that are members of this group. |
|
|
354
|
-
| remove(person) | void | ios | Removes a person from this group. For >= iOS 9, it is not required to call <Tit… |
|
|
355
|
-
| sortedMembers(sortBy) | Array<Titanium.Contacts.Person> | ios | Gets people that are members of this group, sorted in the specified order. |
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
---
|
|
359
|
-
|
|
360
|
-
## Ti.Contacts.Person
|
|
361
|
-
> An object that represents a contact record for a person or organization in the system contacts address book.
|
|
362
|
-
> Extends Ti.Proxy
|
|
363
|
-
> Platforms: both
|
|
364
|
-
|
|
365
|
-
A person object is created using <Titanium.Contacts.createPerson>.
|
|
366
|
-
|
|
367
|
-
The following two kinds of properties exist for this object:
|
|
368
|
-
|
|
369
|
-
* single value - contains either a `string` or `number` type value, an array of `string` type
|
|
370
|
-
values, or `null` if unset.
|
|
371
|
-
* multi-value - contains a dictionary with typical keys of `home`, `work` and/or `other`. Each
|
|
372
|
-
key contains either a `string` type value, an array of `string` type values, or a dictionary
|
|
373
|
-
containing key/value pairs with `string` type values.
|
|
374
|
-
|
|
375
|
-
### Adding and Modifying Properties
|
|
376
|
-
|
|
377
|
-
Support for adding and modifying properties is currently supported on iOS and Android.
|
|
378
|
-
|
|
379
|
-
### Keys as Address Book UI Labels
|
|
380
|
-
|
|
381
|
-
*(See full overview in titanium-docs)*
|
|
382
|
-
|
|
383
|
-
### Properties (unique: 29/32)
|
|
384
|
-
| Property | Type | Default | Platform | Description |
|
|
385
|
-
|----------|------|---------|----------|-------------|
|
|
386
|
-
| address | Dictionary | — | both | Addresses for the person. Multi-value. Read-only on Android. |
|
|
387
|
-
| birthday | String | — | both | Date of birth of the person. Single value. |
|
|
388
|
-
| alternateBirthday | Dictionary | — | ios | Alternate birthday of the person. Single Dictionary. |
|
|
389
|
-
| date | Dictionary | — | both | Dates associated with the person. Multi-value. |
|
|
390
|
-
| department | String | — | both | Department of the person. Single value. |
|
|
391
|
-
| email | Dictionary | — | both | Email addresses for the person. Multi-value. Read-only on Android. |
|
|
392
|
-
| firstName | String | — | both | First name of the person. Single value. |
|
|
393
|
-
| firstPhonetic | String | — | both | Phonetic first name of the person. Single value. |
|
|
394
|
-
| fullName | String | — | both | Localized full name of the person. Single value. Read-only on Android. |
|
|
395
|
-
| id | Number | — | android | Record identifier of the person. Single value. |
|
|
396
|
-
| identifier | String | — | ios | Identifier of the person. |
|
|
397
|
-
| image | Ti.Blob | — | both | Image for the person. Single value. Read-only for >= iOS 9 |
|
|
398
|
-
| instantMessage | Dictionary | — | both | Instant messenger information of the person. Multi-value. |
|
|
399
|
-
| socialProfile | Dictionary | — | ios | Social profile information of the person. Multi-value. |
|
|
400
|
-
| jobTitle | String | — | both | Job title of the person. Single value. |
|
|
401
|
-
| kind | Number | — | both | Determines the type of information the person record contains; either person or… |
|
|
402
|
-
| lastName | String | — | both | Last name of the person. Single value. |
|
|
403
|
-
| lastPhonetic | String | — | both | Phonetic last name of the person. Single value. |
|
|
404
|
-
| middleName | String | — | both | Middle name of the person. Single value. |
|
|
405
|
-
| middlePhonetic | String | — | both | Phonetic middle name of the person. Single value. |
|
|
406
|
-
| nickname | String | — | both | Nickname of the person. Single value. |
|
|
407
|
-
| note | String | — | both | Notes for the person. Single value. |
|
|
408
|
-
| organization | String | — | both | Organization to which the person belongs. Single value. |
|
|
409
|
-
| phone | Dictionary | — | both | Phone numbers for the person. Multi-value. Read-only on Android. |
|
|
410
|
-
| prefix | String | — | both | Prefix for the person. Single value. |
|
|
411
|
-
| recordId | Number | — | ios | Record identifier of the person. Single value. Deprecated since iOS 9. |
|
|
412
|
-
| relatedNames | Dictionary | — | both | Names of people to which the person is related. Multi-value. |
|
|
413
|
-
| suffix | String | — | both | Suffix for the person. Single value. |
|
|
414
|
-
| url | Dictionary | — | both | URLs of webpages associated with the person. Multi-value. |
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
### Related Types
|
|
420
|
-
|
|
421
|
-
#### Dictionary
|
|
422
|
-
> Plain JavaScript object.
|
|
423
|
-
|
|
424
|
-
---
|
|
425
|
-
|
|
426
|
-
## Ti.Geolocation
|
|
427
|
-
> The top level Geolocation module. The Geolocation module is used for accessing device location based information.
|
|
428
|
-
> Extends Ti.Module
|
|
429
|
-
> Platforms: both
|
|
430
|
-
> Type: module
|
|
431
|
-
|
|
432
|
-
This module combines two sets of features:
|
|
433
|
-
|
|
434
|
-
* Location services. Determining the location of the device.
|
|
435
|
-
|
|
436
|
-
* Geocoding and reverse geocoding. Converting geographic coordinates into
|
|
437
|
-
addresses, and converting addresses into geographic coordinates.
|
|
438
|
-
|
|
439
|
-
Using location services can have a significant impact on a device's battery life,
|
|
440
|
-
so it's important to use them in the most efficient manner possible. Power consumption
|
|
441
|
-
is strongly influenced by the accuracy and frequency of location updates required by
|
|
442
|
-
your application.
|
|
443
|
-
|
|
444
|
-
The location services systems of the underlying platforms are very different, so there
|
|
445
|
-
are significant implementation differences between the platforms.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
*(See full overview in titanium-docs)*
|
|
449
|
-
|
|
450
|
-
### Properties (unique: 15/46)
|
|
451
|
-
| Property | Type | Default | Platform | Description |
|
|
452
|
-
|----------|------|---------|----------|-------------|
|
|
453
|
-
| accuracy | Number | — | both | Specifies the requested accuracy for location updates. |
|
|
454
|
-
| distanceFilter | Number | 0 | ios | The minimum change of position (in meters) before a 'location' event is fired. |
|
|
455
|
-
| hasCompass | Boolean | — | both | Indicates whether the current device supports a compass. |
|
|
456
|
-
| headingFilter | Number | 0 (No limit on heading updates) | both | Minimum heading change (in degrees) before a `heading` event is fired. |
|
|
457
|
-
| headingTime | Number | 250 | android | Interval in milliseconds before a `heading` event is fired. |
|
|
458
|
-
| locationServicesAuthorization | Number | — | ios | Returns an authorization constant indicating if the application has access to l… |
|
|
459
|
-
| locationServicesEnabled | Boolean | — | both | Indicates if the user has enabled or disabled location services for the device … |
|
|
460
|
-
| showCalibration | Boolean | true | ios | Determines whether the compass calibration UI is shown if needed. |
|
|
461
|
-
| showBackgroundLocationIndicator | Boolean | false | ios | Specifies that an indicator be shown when the app makes use of continuous backg… |
|
|
462
|
-
| trackSignificantLocationChange | Boolean | false | ios | Indicates if the location changes should be updated only when a significant cha… |
|
|
463
|
-
| allowsBackgroundLocationUpdates | Boolean | false | ios | Determines if the app can do background location updates. |
|
|
464
|
-
| activityType | Number | <Titanium.Geolocation.ACTIVITYTYPE_OTHER> | ios | The type of user activity to be associated with the location updates. |
|
|
465
|
-
| locationAccuracyAuthorization | Number | <Titanium.Geolocation.ACCURACY_AUTHORIZATION_REDUCED> | ios | A value that indicates the level of location accuracy the app has permission to… |
|
|
466
|
-
| pauseLocationUpdateAutomatically | Boolean | false | ios | Indicates whether the location updates may be paused. |
|
|
467
|
-
| lastGeolocation | String | — | both | JSON representation of the last geolocation received. |
|
|
468
|
-
|
|
469
|
-
### Constants (28)
|
|
470
|
-
- **ACCURACY_\***: ACCURACY_BEST, ACCURACY_KILOMETER, ACCURACY_HIGH, ACCURACY_LOW, ACCURACY_REDUCED
|
|
471
|
-
- **ACCURACY_AUTHORIZATION_\***: ACCURACY_AUTHORIZATION_FULL, ACCURACY_AUTHORIZATION_REDUCED
|
|
472
|
-
- **ACCURACY_BEST_FOR_\***: ACCURACY_BEST_FOR_NAVIGATION
|
|
473
|
-
- **ACCURACY_HUNDRED_\***: ACCURACY_HUNDRED_METERS
|
|
474
|
-
- **ACCURACY_NEAREST_TEN_\***: ACCURACY_NEAREST_TEN_METERS
|
|
475
|
-
- **ACCURACY_THREE_\***: ACCURACY_THREE_KILOMETERS
|
|
476
|
-
- **ACTIVITYTYPE_\***: ACTIVITYTYPE_OTHER, ACTIVITYTYPE_FITNESS
|
|
477
|
-
- **ACTIVITYTYPE_AUTOMOTIVE_\***: ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION
|
|
478
|
-
- **ACTIVITYTYPE_OTHER_\***: ACTIVITYTYPE_OTHER_NAVIGATION
|
|
479
|
-
- **AUTHORIZATION_\***: AUTHORIZATION_AUTHORIZED, AUTHORIZATION_DENIED, AUTHORIZATION_RESTRICTED, AUTHORIZATION_UNKNOWN, AUTHORIZATION_ALWAYS
|
|
480
|
-
- **AUTHORIZATION_WHEN_IN_\***: AUTHORIZATION_WHEN_IN_USE
|
|
481
|
-
- **ERROR_\***: ERROR_DENIED, ERROR_NETWORK
|
|
482
|
-
- **ERROR_HEADING_\***: ERROR_HEADING_FAILURE
|
|
483
|
-
- **ERROR_LOCATION_\***: ERROR_LOCATION_UNKNOWN
|
|
484
|
-
- **ERROR_REGION_MONITORING_\***: ERROR_REGION_MONITORING_DELAYED, ERROR_REGION_MONITORING_DENIED, ERROR_REGION_MONITORING_FAILURE
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
### Methods (7)
|
|
488
|
-
| Method | Returns | Platform | Description |
|
|
489
|
-
|--------|---------|----------|-------------|
|
|
490
|
-
| forwardGeocoder(address, callback) | Promise<ForwardGeocodeResponse> | both | Resolves an address to a location. |
|
|
491
|
-
| getCurrentHeading(callback) | Promise<HeadingResponse> | both | Retrieves the current compass heading. |
|
|
492
|
-
| getCurrentPosition(callback) | Promise<LocationResults> | both | Retrieves the last known location from the device. |
|
|
493
|
-
| hasLocationPermissions(authorizationType) | Boolean | both | Returns `true` if the app has location access. |
|
|
494
|
-
| requestLocationPermissions(authorizationType, callback) | Promise<LocationAuthorizationResponse> | both | Requests for location access. |
|
|
495
|
-
| requestTemporaryFullAccuracyAuthorization(purposeKey, callback) | void | ios | Requests the user's permission to temporarily use location services with full a… |
|
|
496
|
-
| reverseGeocoder(latitude, longitude, callback) | Promise<ReverseGeocodeResponse> | both | Tries to resolve a location to an address. |
|
|
497
|
-
|
|
498
|
-
### Events (6)
|
|
499
|
-
| Event | Platform | Description |
|
|
500
|
-
|-------|----------|-------------|
|
|
501
|
-
| calibration | ios | Fired when the device detects interface and requires calibration. |
|
|
502
|
-
| heading | both | Fired when an heading update is received. |
|
|
503
|
-
| location | both | Fired when a location update is received. |
|
|
504
|
-
| locationupdatepaused | ios | Fired when location updates are paused by the OS. |
|
|
505
|
-
| locationupdateresumed | ios | Fired when location manager is resumed by the OS. |
|
|
506
|
-
| authorization | ios | Fired when changes are made to the authorization status for location services. |
|
|
507
|
-
|
|
508
|
-
### Related Types
|
|
509
|
-
|
|
510
|
-
#### HeadingData
|
|
511
|
-
> Simple object holding compass heading data.
|
|
512
|
-
|
|
513
|
-
| Property | Type | Description |
|
|
514
|
-
|----------|------|-------------|
|
|
515
|
-
| accuracy | Number | Accuracy of the compass heading, in platform-specific units. |
|
|
516
|
-
| magneticHeading | Number | Declination in degrees from magnetic North. |
|
|
517
|
-
| trueHeading | Number | Declination in degrees from true North. |
|
|
518
|
-
| timestamp | Number | Timestamp for the heading data, in milliseconds. |
|
|
519
|
-
| x | Number | Raw geomagnetic data for the X axis. |
|
|
520
|
-
| y | Number | Raw geomagnetic data for the Y axis. |
|
|
521
|
-
| z | Number | Raw geomagnetic data for the Z axis. |
|
|
522
|
-
|
|
523
|
-
#### LocationCoordinates
|
|
524
|
-
> Simple object holding the data for a location update.
|
|
525
|
-
|
|
526
|
-
| Property | Type | Description |
|
|
527
|
-
|----------|------|-------------|
|
|
528
|
-
| latitude | Number | Latitude of the location update, in decimal degrees. |
|
|
529
|
-
| longitude | Number | Longitude of the location update, in decimal degrees. |
|
|
530
|
-
| altitude | Number | Altitude of the location update, in meters. |
|
|
531
|
-
| accuracy | Number | Accuracy of the location update, in meters. |
|
|
532
|
-
| altitudeAccuracy | Number | Vertical accuracy of the location update, in meters. |
|
|
533
|
-
| heading | Number | Compass heading, in degrees. May be unknown if device is not moving. On iOS, a … |
|
|
534
|
-
| speed | Number | Current speed in meters/second. On iOS, a negative value indicates that the hea… |
|
|
535
|
-
| timestamp | Number | Timestamp for this location update, in milliseconds. |
|
|
536
|
-
| floor | LocationCoordinatesFloor | The floor of the building on which the user is located. |
|
|
537
|
-
|
|
538
|
-
#### LocationProviderDict
|
|
539
|
-
> Simple object describing a location provider.
|
|
540
|
-
|
|
541
|
-
| Property | Type | Description |
|
|
542
|
-
|----------|------|-------------|
|
|
543
|
-
| accuracy | Number | Accuracy of the location provider, either fine (1) or coarse (2). |
|
|
544
|
-
| name | String | Name of the location provider. |
|
|
545
|
-
| power | Number | Power consumption for this provider, either low (1), medium (2), or high (3). |
|
|
546
|
-
|
|
547
|
-
---
|
|
548
|
-
|
|
549
|
-
## Ti.Geolocation.Android
|
|
550
|
-
> Module for Android-specific geolocation functionality.
|
|
551
|
-
> Extends Ti.Module
|
|
552
|
-
> Platforms: android
|
|
553
|
-
> Type: module
|
|
554
|
-
|
|
555
|
-
This module is used for manually configuring geolocation settings on Android.
|
|
556
|
-
|
|
557
|
-
Manual configuration is recommended for applications that have more demanding
|
|
558
|
-
geolocation needs (for example, driving directions). However, for basic geolocation
|
|
559
|
-
information, *simple mode* geolocation may be sufficient. For information on simple
|
|
560
|
-
mode, see <Titanium.Geolocation>.
|
|
561
|
-
|
|
562
|
-
Manual configuration involves managing *providers* and *rules*:
|
|
563
|
-
|
|
564
|
-
* *Location providers*, such as GPS, provide location updates.
|
|
565
|
-
|
|
566
|
-
* *Location rules* filter the results returned by location providers.
|
|
567
|
-
|
|
568
|
-
Configuring geolocation manually involves three steps:
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
*(See full overview in titanium-docs)*
|
|
572
|
-
|
|
573
|
-
### Properties (unique: 1/7)
|
|
574
|
-
| Property | Type | Default | Platform | Description |
|
|
575
|
-
|----------|------|---------|----------|-------------|
|
|
576
|
-
| manualMode | Boolean | false | android | Set to `true` to enable manual configuration of location updates through this m… |
|
|
577
|
-
|
|
578
|
-
### Constants (3)
|
|
579
|
-
- **PROVIDER_\***: PROVIDER_GPS, PROVIDER_NETWORK, PROVIDER_PASSIVE
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
### Methods (6)
|
|
583
|
-
| Method | Returns | Platform | Description |
|
|
584
|
-
|--------|---------|----------|-------------|
|
|
585
|
-
| addLocationProvider(provider) | void | android | Adds and enables the specified location provider, possibly replacing an existin… |
|
|
586
|
-
| removeLocationProvider(provider) | void | android | Disables and removes the specified location provider. |
|
|
587
|
-
| addLocationRule(rule) | void | android | Adds and enables the specified location rule. |
|
|
588
|
-
| removeLocationRule(rule) | void | android | Disables and removes the specified location rule. |
|
|
589
|
-
| createLocationProvider(parameters) | Ti.Geolocation.Android.LocationProvider | android | Creates and returns an instance of <Titanium.Geolocation.Android.LocationProvid… |
|
|
590
|
-
| createLocationRule(parameters) | Ti.Geolocation.Android.LocationRule | android | Creates and returns an instance of <Titanium.Geolocation.Android.LocationRule>. |
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
---
|
|
594
|
-
|
|
595
|
-
## Ti.Geolocation.Android.LocationProvider
|
|
596
|
-
> Represents a source of location information, such as GPS.
|
|
597
|
-
> Extends Ti.Proxy
|
|
598
|
-
> Platforms: android
|
|
599
|
-
|
|
600
|
-
See <Titanium.Geolocation.Android> for details on using `LocationProviders` to
|
|
601
|
-
manually configure location updates.
|
|
602
|
-
|
|
603
|
-
### Properties (unique: 3/6)
|
|
604
|
-
| Property | Type | Default | Platform | Description |
|
|
605
|
-
|----------|------|---------|----------|-------------|
|
|
606
|
-
| name | String | — | android | Type of location provider: [PROVIDER_GPS](Titanium.Geolocation.Android.PROVIDER… |
|
|
607
|
-
| minUpdateTime | Number | — | android | Limits the frequency of location updates to no more than one per `minUpdateTime… |
|
|
608
|
-
| minUpdateDistance | Number | — | android | Don't send a location update unless the location has changed at least `minUpdat… |
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
---
|
|
614
|
-
|
|
615
|
-
## Ti.Geolocation.Android.LocationRule
|
|
616
|
-
> A location rule to filter the results returned by location providers.
|
|
617
|
-
> Extends Ti.Proxy
|
|
618
|
-
> Platforms: android
|
|
619
|
-
|
|
620
|
-
All of the properties are optional.
|
|
621
|
-
|
|
622
|
-
See <Titanium.Geolocation.Android> for details on using `LocationProviders` to
|
|
623
|
-
manually configure location updates.
|
|
624
|
-
|
|
625
|
-
### Properties (unique: 4/7)
|
|
626
|
-
| Property | Type | Default | Platform | Description |
|
|
627
|
-
|----------|------|---------|----------|-------------|
|
|
628
|
-
| name | String | — | android | If specified, this rule only applies to updates generated by the specified prov… |
|
|
629
|
-
| accuracy | Number | — | android | Minimum accuracy required for a location update. |
|
|
630
|
-
| minAge | Number | — | android | Controls the frequency of location updates. |
|
|
631
|
-
| maxAge | Number | — | android | Controls the freshness of location updates. Do not forward an update unless it … |
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
---
|
|
637
|
-
|
|
638
|
-
## Ti.WatchSession
|
|
639
|
-
> Used to enable data and file transfers between a watchOS and iOS application.
|
|
640
|
-
> Extends Ti.Module
|
|
641
|
-
> Platforms: ios
|
|
642
|
-
> Type: module
|
|
643
|
-
|
|
644
|
-
WatchSession enables data and file transfers between a WatchKit application and a Titanium application
|
|
645
|
-
using the iOS Watch Connectivity framework introduced in iOS 9 and watchOS 2.
|
|
646
|
-
|
|
647
|
-
### Properties (unique: 10/15)
|
|
648
|
-
| Property | Type | Default | Platform | Description |
|
|
649
|
-
|----------|------|---------|----------|-------------|
|
|
650
|
-
| activationState | Number | — | ios | Returns the current activation state of the watch. |
|
|
651
|
-
| hasContentPending | Boolean | — | ios | Returns `true` if there is more content for the session to deliver. |
|
|
652
|
-
| remainingComplicationUserInfoTransfers | Number | 0 | ios | The number of calls remaining to `transferCurrentComplication` before the syste… |
|
|
653
|
-
| isSupported | Boolean | — | ios | Returns `true` if the device supports watch connectivity. |
|
|
654
|
-
| isPaired | Boolean | — | ios | Returns `true` if the device is paired with a watch. |
|
|
655
|
-
| isWatchAppInstalled | Boolean | — | ios | Returns `true` if the accompanying watch app is installed. |
|
|
656
|
-
| isComplicationEnabled | Boolean | — | ios | Returns `true` if complication is enabled on the installed watch app. |
|
|
657
|
-
| isReachable | Boolean | — | ios | Returns `true` if the watch is currently reachable. |
|
|
658
|
-
| isActivated | Boolean | — | ios | Returns `true` if the watch is currently activated. |
|
|
659
|
-
| recentApplicationContext | Dictionary | — | ios | The most recent application context sent to the watch app. |
|
|
660
|
-
|
|
661
|
-
### Constants (3)
|
|
662
|
-
- **ACTIVATION_STATE_\***: ACTIVATION_STATE_INACTIVE, ACTIVATION_STATE_ACTIVATED
|
|
663
|
-
- **ACTIVATION_STATE_NOT_\***: ACTIVATION_STATE_NOT_ACTIVATED
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
### Methods (9)
|
|
667
|
-
| Method | Returns | Platform | Description |
|
|
668
|
-
|--------|---------|----------|-------------|
|
|
669
|
-
| activateSession(—) | void | ios | Activates the watch session |
|
|
670
|
-
| sendMessage(message, reply) | void | ios | Sends a message to the Apple Watch. |
|
|
671
|
-
| updateApplicationContext(params) | void | ios | Sends an app context update to the Apple Watch. |
|
|
672
|
-
| transferUserInfo(params) | void | ios | Transfers an user info to the Apple Watch. |
|
|
673
|
-
| transferFile(params) | void | ios | Transfers a file to the Apple Watch. |
|
|
674
|
-
| transferCurrentComplication(params) | void | ios | Transfers complication data to the watch application. |
|
|
675
|
-
| cancelAllUserInfoTransfers(—) | void | ios | Cancels all incomplete user info and complication transfers to the Apple Watch. |
|
|
676
|
-
| cancelAllFileTransfers(—) | void | ios | Cancels all incomplete file transfers to the Apple Watch. |
|
|
677
|
-
| cancelAllTransfers(—) | void | ios | Cancels all incomplete transfers to the Apple Watch. |
|
|
678
|
-
|
|
679
|
-
### Events (11)
|
|
680
|
-
| Event | Platform | Description |
|
|
681
|
-
|-------|----------|-------------|
|
|
682
|
-
| receivemessage | ios | App received message from Apple Watch in foreground. Will be called on startup … |
|
|
683
|
-
| receiveapplicationcontext | ios | App received app context from Apple Watch. Will be called on startup if an appl… |
|
|
684
|
-
| receiveuserinfo | ios | App received user info from Apple Watch in background. Will be called on startu… |
|
|
685
|
-
| receivefile | ios | App received file from Apple Watch in background. |
|
|
686
|
-
| watchstatechanged | ios | The watch state has changed. |
|
|
687
|
-
| reachabilitychanged | ios | The watch reachability state has changed. |
|
|
688
|
-
| finishuserinfotransfer | ios | Fired when the application completed user info transfer to the watch app. |
|
|
689
|
-
| finishfiletransfer | ios | App completed file transfer to watch app. |
|
|
690
|
-
| inactive | ios | Called when the session can no longer be used to modify or add any new transfer… |
|
|
691
|
-
| deactivate | ios | Called when all events for the previously selected watch has occurred. The sess… |
|
|
692
|
-
| activationCompleted | ios | Called when the session has completed activation. If session state is <Titanium… |
|
|
693
|
-
|
|
694
|
-
### Related Types
|
|
695
|
-
|
|
696
|
-
#### Dictionary
|
|
697
|
-
> Plain JavaScript object.
|
|
698
|
-
|
|
699
|
-
---
|
|
700
|
-
|