Adds a custom event.
The custom event.
A promise that returns null if resolved, or an Error if the custom event is rejected.
Adds a listener for an Urban Airship event.
The event type. Either EventType.NotificationResponse, EventType.PushReceived, EventType.Register, EventType.Registration, EventType.DeepLink, EventType.NotificationOptInStatus, EventType.InboxUpdated, or EventType.ShowInbox.
The event listener.
A subscription.
Adds a channel tag.
A channel tag.
Associates an identifier for the Connect data stream.
The identifier's key.
The identifier's id, or null/undefined to clear.
Resets the current locale.
Clears a specific notification. Supported on Android and iOS 10+.
The notification identifier. The identifier will be available in the PushReceived event and in the active notification response under the "notificationId" field.
Clears all notifications for the application. Supported on Android and iOS 10+. For older iOS devices, you can set the badge number to 0 to clear notifications.
Deletes an inbox message.
The id of the message to be deleted.
A promise with the result.
Disables one or many features.
A promise that returns true if the disablement was authorized.
Dismisses the currently displayed inbox message.
Dismisses the default message center.
Displays an inbox message.
The id of the message to be displayed.
A promise with the result.
Displays the default message center.
Creates an editor to modify the channel attributes.
An attribute editor instance.
Edit the subscription lists associated with the current Channel.
A promise with the result.
Creates an editor to modify the channel tag groups.
A tag group editor instance.
Creates an editor to modify the contact attributes.
An attribute editor instance.
Edit the subscription lists associated with the current Contact.
A promise with the result.
Creates an editor to modify the contact tag groups.
A tag group editor instance.
Creates an editor to modify the named user attributes.
An attribute editor instance.
Creates an editor to modify the named user tag groups.
A tag group editor instance.
Edit the subscription List.
A promise with the result.
Enables channel creation if channelCreationDelayEnabled was
enabled in the config.
Enables one or many features.
A promise that returns true if the enablement was authorized.
Enables user notifications.
A promise that returns true if enablement was authorized or false if enablement was rejected
Gets all the active notifications for the application. Supported on Android Marshmallow (23)+ and iOS 10+.
A promise with the result.
Gets the current badge number for iOS. Badging is not supported for Android and this method will always return 0.
A promise with the result.
Gets the channel ID.
A promise with the result.
Getting the locale currently used by Airship.
Gets a Feature array with the enabled features.
A promise that returns the enabled features as a Feature array.
Retrieves the current inbox messages.
A promise with the result.
Gets the named user.
A promise with the result.
Gets the status of the specified Notification Channel. This method is only supported on Android. iOS will throw an error.
The channel's name.
A promise with the result.
Gets the notification status for the app.
A promise with the result.
Gets the registration token.
A promise with the result. The registration token might be undefined if registration is currently in progress, if the app is not setup properly for remote notifications, if running on an iOS simulator, or if running on an Android device that has an outdated or missing version of Google Play Services.
Gets the subscription lists.
The types of subscription lists. Values: channel, contact (default: [channel]).
A promise with the result.
Gets the channel tags.
A promise with the result.
Gets the count of Unread messages in the inbox.
Checks if analytics is enabled or not.
A promise with the result.
Checks to see if autobadging on iOS is enabled. Badging is not supported for Android.
A promise with the result, either true or false.
Checks if a given feature is enabled or not.
A promise that returns true if the features are enabled, false otherwise.
Checks if Airship is initialized.
A promise with the result. The result will be true if Airship is initialized, otherwise false.
Checks if app notifications are enabled at a system level or not. Its possible to have userNotificationsEnabled
but app notifications being disabled if the user opted out of notifications.
A promise with the result.
Checks if user notifications are enabled or not.
A promise with the result.
Checks if app notifications are enabled or not. Its possible to have userNotificationsEnabled
but app notifications being disabled if the user opted out of notifications.
A promise with the result.
Marks an inbox message as read.
The id of the message to be marked as read.
A promise with the result.
Forces the inbox to refresh. This is normally not needed as the inbox will automatically refresh on foreground or when a push arrives that's associated with a message.
Removes all listeners for Urban Airship events.
The event type. Either EventType.NotificationResponse, EventType.PushReceived, EventType.Register, EventType.Registration, EventType.DeepLink, EventType.NotificationOptInStatus, EventType.InboxUpdated, or EventType.ShowInbox.
Removes a listener for an Urban Airship event.
The event type. Either EventType.NotificationResponse, EventType.PushReceived, EventType.Register, EventType.Registration, EventType.DeepLink, EventType.NotificationOptInStatus, EventType.InboxUpdated, or EventType.ShowInbox.
The event listener. Should be a reference to the function passed into addListener.
Removes a channel tag.
A channel tag.
Enables or disables analytics.
Disabling analytics will delete any locally stored events and prevent any events from uploading. Features that depend on analytics being enabled may not work properly if it's disabled (reports, region triggers, location segmentation, push to local time).
true to enable notifications, false to disable.
Sets the Android notification config. Values not set will fallback to any values set in the airship config options.
The notification config object.
Sets the default behavior when the message center is launched from a push notification. If set to false the message center must be manually launched.
true to automatically launch the default message center, false to disable.
Enables or disables autobadging on iOS. Badging is not supported for Android.
Whether or not to enable autobadging.
Sets the badge number for iOS. Badging is not supported for Android.
The badge number.
Overriding the locale.
The locale identifier.
Sets the SDK features that will be enabled. The rest of the features will be disabled.
If all features are disabled the SDK will not make any network requests or collect data.
A promise that returns true if the enablement was authorized.
Sets the foreground presentation options for iOS. This method is only supported on iOS. Android will no-op.
The array of foreground presentation options.
Sets the in-app message display interval on the default display coordinator.
The minimum number of seconds between message displays.
Sets the named user.
The named user string, or null/undefined to clear the named user.
Sets the notification options for iOS. This method is only supported on iOS. Android will no-op.
The array of notification options.
Sets user notifications enabled. The first time user notifications are enabled on iOS, it will prompt the user for notification permissions.
true to enable notifications, false to disable.
Calls takeOff. If Airship is already initialized the new config will be applied on next app init.
The airship config.
A promise with the result. The result will be true if Airship is initialized, otherwise false.
Initiates screen tracking for a specific app screen, must be called once per tracked screen.
The screen's string identifier
Generated using TypeDoc
The main Airship API.