-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
UserNotificationCenter.yml
232 lines (199 loc) Β· 7.48 KB
/
UserNotificationCenter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
---
name: Titanium.App.iOS.UserNotificationCenter
summary: |
The top-level App iOS Notification Center module, available only to iOS devices running iOS 8 or later. It is
used to control scheduled notifications and receive details about the system-wide notification settings.
extends: Titanium.Module
platforms: [iphone, ipad]
osver: {ios: {min: "8.0"}}
since: "7.3.0"
methods:
- name: getPendingNotifications
summary: Fetches the pending notifications asynchronously.
parameters:
- name: callback
summary: |
The function that is being called after the notifications
have been fetched.
type: Callback<UserNotificationCallbackResponse>
since: "7.3.0"
- name: getDeliveredNotifications
summary: Fetches the delivered notifications asynchronously.
parameters:
- name: callback
summary: |
The function that is being called after the notifications
have been fetched.
type: Callback<UserNotificationCallbackResponse>
osver: {ios: {min: "10.0"}}
since: "7.3.0"
- name: removePendingNotifications
summary: |
Removes the specified pending notifications to prevent them from being triggered.
If no notifications are specified, all pending notifications will be removed.
since: "7.3.0"
- name: removeDeliveredNotifications
summary: |
Removes the specified delivered notifications from the notification-center.
If no notifications are specified, all delivered notifications will be removed.
osver: {ios: {min: "10.0"}}
since: "7.3.0"
- name: requestUserNotificationSettings
summary: |
Notification types and user notification categories the application is registered to use
(available on iOS 8 and later).
parameters:
- name: callback
summary: The callback invoked when requesting user notification settings.
type: Callback<GetUserNotificationSettings>
since: "7.3.0"
---
name: UserNotificationCallbackResponse
summary: |
Response when receiving pending or local notifications
in <Titanium.App.iOS.UserNotificationCenter.getPendingNotifications> and
<Titanium.App.iOS.UserNotificationCenter.getDeliveredNotifications>.
since: "7.3.0"
properties:
- name: notifications
type: Array<UserNotificationDictionary>
summary: An array of identifiers used to create notifications.
---
name: UserNotificationDictionary
summary: |
Dictionary of notification data used in the array of `notifications`
when receiving pending or local notifications in
<Titanium.App.iOS.UserNotificationCenter.getPendingNotifications> and
<Titanium.App.iOS.UserNotificationCenter.getDeliveredNotifications>.
since: "7.3.0"
properties:
- name: alertTitle
summary: Title of the notification.
type: String
osver: {ios: {min: "8.2"}}
- name: alertSubtitle
summary: Subtitle of the notification.
type: String
osver: {ios: {min: "10.0"}}
- name: alertAction
summary: |
Alert button text ('Open', by default) or home text ('Press Home to unlock', by default)
type: String
type: String
- name: alertBody
summary: Alert message.
type: String
- name: alertLaunchImage
summary: Image displayed instead of `Default.png` when launching the application.
type: String
- name: badge
summary: Application badge value.
type: Number
- name: date
summary: Date and time when the notification was configured to fire.
type: Date
- name: sound
summary: Path to the sound file configured to play when the notification was fired.
type: String
- name: timezone
summary: Timezone of the date when the notification was configured to fire.
type: String
- name: userInfo
summary: Custom data object.
type: Dictionary
- name: category
summary: Category identifier of the notification.
type: String
osver: {ios: {min: "8.0"}}
- name: identifier
summary: The notification identifier.
description: |
This property is required in iOS 10 and later and will fallback
to "notification" if not set.
optional: false
since: "7.3.0"
type: String
- name: region
summary: Region of the notification.
description: |
The following keys are included:
- latitude: The latitude of the region.
- longitude: The longitude of the region.
- radius: The radius of the region.
- identifier: The identifier of the region.
type: Dictionary
osver: {ios: {min: "10.0"}}
---
name: GetUserNotificationSettings
summary: |
Dictionary object of parameters used to register the application with local notifications using
the <Titanium.App.iOS.registerUserNotificationSettings> method.
platforms: [iphone, ipad]
properties:
- name: types
summary: Notification types to use.
description: |
Only available in iOS < 10. iOS 10 and later returns notification settings more detailed,
check the other attributes for more information.
type: Array<Number>
constants: Titanium.App.iOS.USER_NOTIFICATION_TYPE_*
- name: categories
summary: Set of categories of user notification actions required by the applicaiton to use.
type: Array<Titanium.App.iOS.UserNotificationCategory>
description: |
Only available in iOS < 10. iOS 10 and later returns notification settings more detailed,
check the other attributes for more information.
- name: authorizationStatus
summary: The current authorization status for using notifications.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_AUTHORIZATION_STATUS_*]
osver: {ios: {min: "10.0"}}
- name: soundSetting
summary: The current sound settings.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: {ios: {min: "10.0"}}
- name: badgeSetting
summary: The current badge settings.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: {ios: {min: "10.0"}}
- name: alertSetting
summary: The current alert settings.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: {ios: {min: "10.0"}}
- name: notificationCenterSetting
summary: The current notication-center settings.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: {ios: {min: "10.0"}}
- name: lockScreenSetting
summary: The current lock-screen settings.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: {ios: {min: "10.0"}}
- name: carPlaySetting
summary: The current CarPlay settings.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: {ios: {min: "10.0"}}
- name: criticalAlertSetting
summary: |
The authorization status to play sounds for critical alerts.
Available in Titanium SDK 7.4.0 and later.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: { ios: { min: "12.0" } }
- name: providesAppNotificationSettings
summary: |
A Boolean value indicating the system displays a button for in-app notification settings.
Available in Titanium SDK 7.4.0 and later.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_SETTING_*]
osver: { ios: { min: "12.0" } }
- name: alertStyle
summary: The current alert style used to display notifications.
type: Number
constants: [Titanium.App.iOS.USER_NOTIFICATION_ALERT_STYLE_*]
osver: {ios: {min: "10.0"}}