Titanium.App.iOS.UserNotificationCenter
The top-level App iOS Notification Center module. It is used to control scheduled notifications and receive details about the system-wide notification settings.
Extends: Titanium.Module · Since: 7.3.0 · Platforms: iphone, ipad, macos
Properties #
apiName#
Type: String
The name of the API that this proxy corresponds to.
The value of this property is the fully qualified name of the API. For example, Button
returns Ti.UI.Button.
lifecycleContainer#
Type: Titanium.UI.Window, Titanium.UI.TabGroup
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks
will also be called on the proxy. Proxies that require the activity lifecycle will need this property set
to the appropriate containing Window or TabGroup.
Methods #
getDeliveredNotifications #
Fetches the delivered notifications asynchronously.
| Name | Type | Summary | Optional |
|---|---|---|---|
callback | Callback<UserNotificationCallbackResponse> | The function that is being called after the notifications have been fetched. | No |
getPendingNotifications #
Fetches the pending notifications asynchronously.
| Name | Type | Summary | Optional |
|---|---|---|---|
callback | Callback<UserNotificationCallbackResponse> | The function that is being called after the notifications have been fetched. | No |
removeDeliveredNotifications #
Removes the specified delivered notifications from the notification-center.
If no notifications are specified, all delivered notifications will be removed.
Delivered notifications can be obtained via a call to the Titanium.App.iOS.UserNotificationCenter.getDeliveredNotifications
method.
| Name | Type | Summary | Optional |
|---|---|---|---|
notifications | Array<UserNotificationDictionary> | The delivered notification to remove. If none specified, all pending notifications will be removed. | No |
removePendingNotifications #
Removes the specified pending notifications to prevent them from being triggered.
If no notifications are specified, all pending notifications will be removed.
Pending notifications can be obtained via a call to the Titanium.App.iOS.UserNotificationCenter.getPendingNotifications
method.
| Name | Type | Summary | Optional |
|---|---|---|---|
notifications | Array<UserNotificationDictionary> | The pending notification to remove. If none specified, all pending notifications will be removed. | No |
requestUserNotificationSettings #
Notification types and user notification categories the application is registered to use.
| Name | Type | Summary | Optional |
|---|---|---|---|
callback | Callback<GetUserNotificationSettings> | The callback invoked when requesting user notification settings. | No |