public class

AirshipConfigOptions

extends Object
java.lang.Object
   ↳ com.urbanairship.AirshipConfigOptions

Class Overview

This class holds the set of options necessary to properly initialize UAirship.

Summary

Nested Classes
class AirshipConfigOptions.Builder Airship config builder. 
class AirshipConfigOptions.ConfigException Config exceptions when trying to load properties from a resource. 
@interface AirshipConfigOptions.Site  
Constants
String ADM_TRANSPORT The ADM transport type for Push.
String FCM_TRANSPORT The FCM transport type for Push.
String FEATURE_ALL Maps to the feature FEATURE_ALL when used in the properties or xml config.
String FEATURE_ANALYTICS Maps to the feature FEATURE_ANALYTICS when used in the properties or xml config.
String FEATURE_CONTACTS Maps to the feature FEATURE_CONTACTS when used in the properties or xml config.
String FEATURE_IN_APP_AUTOMATION Maps to the feature FEATURE_IN_APP_AUTOMATION when used in the properties or xml config.
String FEATURE_MESSAGE_CENTER Maps to the feature FEATURE_MESSAGE_CENTER when used in the properties or xml config.
String FEATURE_NONE Maps to the feature FEATURE_NONE when used in the properties or xml config.
String FEATURE_PUSH Maps to the feature FEATURE_PUSH when used in the properties or xml config.
String FEATURE_TAGS_AND_ATTRIBUTES Maps to the feature FEATURE_TAGS_AND_ATTRIBUTES when used in the properties or xml config.
String HMS_TRANSPORT The HMS transport type for Push.
String SITE_EU EU data site.
String SITE_US US data site.
Fields
public final List<String> allowedTransports The transport types allowed for Push.
public final boolean analyticsEnabled Flag indicating whether the application will use analytics.
public final String appKey Airship app key.
public final String appSecret Airship app secret.
public final Uri appStoreUri Optional app store link when using the rate app action.
public final boolean autoLaunchApplication Flag indicating whether or not to launch the launcher activity when a push notification or push notification button is opened and the application intent receiver did not launch an activity.
public final boolean autoPauseInAppAutomationOnLaunch Flag indicating whether or not the SDK will automatically pause In-App Automation during app launch.
public final long backgroundReportingIntervalMS Minimum delta in milliseconds between analytics uploads when adding location events while in the background.
public final boolean channelCaptureEnabled Flag indicating whether channel capture feature is enabled or not.
public final boolean channelCreationDelayEnabled Flag indicating whether channel creation delay is enabled or not.
public final boolean dataCollectionOptInEnabled This field is deprecated. Use enabledFeatures instead.
public final int enabledFeatures Default enabled Airship features for the app.
public final boolean extendedBroadcastsEnabled Flag indicating whether or not to perform extended broadcasts.
public final String fcmFirebaseAppName The Firebase app name to use for FCM instead of the default app.
public final boolean inProduction Flag indicating whether the application is in production.
public final String initialConfigUrl The initial config URL.
public final boolean isPromptForPermissionOnUserNotificationsEnabled Flag indicating whether or not the SDK will automatically prompt for notification permission when enabling notifications with setUserNotificationsEnabled(boolean).
public final int logLevel Logger level when the application is in debug mode.
public final int notificationAccentColor Notification accent color.
public final String notificationChannel The default notification channel.
public final int notificationIcon Notification icon.
public final int notificationLargeIcon Large notification icon.
public final boolean requireInitialRemoteConfigEnabled Flag indicating whether the SDK will wait for an initial remote config instead of falling back on default API URLs.
public final List<String> urlAllowList Additional URLs that will be added to the allow list for both SCOPE_OPEN_URL and SCOPE_JAVASCRIPT_INTERFACE scopes.
public final List<String> urlAllowListScopeJavaScriptInterface Additional URLs that will be added to the allow list for scope SCOPE_JAVASCRIPT_INTERFACE.
public final List<String> urlAllowListScopeOpenUrl Additional URLs that will be added to the allow list for scope SCOPE_OPEN_URL.
Public Methods
static AirshipConfigOptions.Builder newBuilder()
Factory method to create an AirshipConfig builder.
void validate()
Validates the config.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ADM_TRANSPORT

The ADM transport type for Push.

Constant Value: "ADM"

public static final String FCM_TRANSPORT

The FCM transport type for Push.

Constant Value: "FCM"

public static final String FEATURE_ALL

Maps to the feature FEATURE_ALL when used in the properties or xml config.

Constant Value: "all"

public static final String FEATURE_ANALYTICS

Maps to the feature FEATURE_ANALYTICS when used in the properties or xml config.

Constant Value: "analytics"

public static final String FEATURE_CONTACTS

Maps to the feature FEATURE_CONTACTS when used in the properties or xml config.

Constant Value: "contacts"

public static final String FEATURE_IN_APP_AUTOMATION

Maps to the feature FEATURE_IN_APP_AUTOMATION when used in the properties or xml config.

Constant Value: "in_app_automation"

public static final String FEATURE_MESSAGE_CENTER

Maps to the feature FEATURE_MESSAGE_CENTER when used in the properties or xml config.

Constant Value: "message_center"

public static final String FEATURE_NONE

Maps to the feature FEATURE_NONE when used in the properties or xml config.

Constant Value: "none"

public static final String FEATURE_PUSH

Maps to the feature FEATURE_PUSH when used in the properties or xml config.

Constant Value: "push"

public static final String FEATURE_TAGS_AND_ATTRIBUTES

Maps to the feature FEATURE_TAGS_AND_ATTRIBUTES when used in the properties or xml config.

Constant Value: "tags_and_attributes"

public static final String HMS_TRANSPORT

The HMS transport type for Push.

Constant Value: "HMS"

public static final String SITE_EU

EU data site. In order to use this site, your project must be created at go.airship.eu

Constant Value: "EU"

public static final String SITE_US

US data site. In order to use this site, your project must be created at go.airship.com

Constant Value: "US"

Fields

public final List<String> allowedTransports

The transport types allowed for Push.

Defaults to ADM, FCM.

public final boolean analyticsEnabled

Flag indicating whether the application will use analytics.

The flag defaults to true.

public final String appKey

Airship app key.

This string is generated automatically when you create an app in the Airship dashboard, which you can manually copy into your app configuration.

public final String appSecret

Airship app secret.

This string is generated automatically when you create an app in the Airship dashboard, which you can manually copy into your app configuration.

public final Uri appStoreUri

Optional app store link when using the rate app action. If not set, the action will generate it using hte app's current package name.

Example: "market://details?id=com.example.android"

public final boolean autoLaunchApplication

Flag indicating whether or not to launch the launcher activity when a push notification or push notification button is opened and the application intent receiver did not launch an activity.

Defaults to true.

public final boolean autoPauseInAppAutomationOnLaunch

Flag indicating whether or not the SDK will automatically pause In-App Automation during app launch. Defaults to false.

public final long backgroundReportingIntervalMS

Minimum delta in milliseconds between analytics uploads when adding location events while in the background.

Defaults to 15 minutes.

public final boolean channelCaptureEnabled

Flag indicating whether channel capture feature is enabled or not.

The flag defaults to true.

public final boolean channelCreationDelayEnabled

Flag indicating whether channel creation delay is enabled or not.

The flag defaults to false.

public final boolean dataCollectionOptInEnabled

This field is deprecated.
Use enabledFeatures instead.

Flag indicating if the data collection opt-in is enabled.

The flag defaults to false

public final int enabledFeatures

Default enabled Airship features for the app. For more details, see PrivacyManager. Defaults to FEATURE_ALL. When specifying the features in either xml or a properties file, use one of the names for convenience: - FEATURE_ALL - FEATURE_NONE - FEATURE_MESSAGE_CENTER - FEATURE_TAGS_AND_ATTRIBUTES - FEATURE_IN_APP_AUTOMATION - FEATURE_CONTACTS - FEATURE_ANALYTICS - FEATURE_PUSH

public final boolean extendedBroadcastsEnabled

Flag indicating whether or not to perform extended broadcasts. When extended broadcasts are enabled, the channel identifier and app key are added to the AIRSHIP_READY broadcast and the channel identifier is included in a new CHANNEL_CREATED broadcast.

Defaults to false.

public final String fcmFirebaseAppName

The Firebase app name to use for FCM instead of the default app.

public final boolean inProduction

Flag indicating whether the application is in production.

Defaults to false.

public final String initialConfigUrl

The initial config URL.

public final boolean isPromptForPermissionOnUserNotificationsEnabled

Flag indicating whether or not the SDK will automatically prompt for notification permission when enabling notifications with setUserNotificationsEnabled(boolean).

public final int logLevel

Logger level when the application is in debug mode. Possible values are:

  • ASSERT
  • NONE
  • DEBUG
  • ERROR
  • INFO
  • VERBOSE
  • WARN

Defaults to DEBUG

public final int notificationAccentColor

Notification accent color.

public final String notificationChannel

The default notification channel.

public final int notificationIcon

Notification icon.

public final int notificationLargeIcon

Large notification icon.

public final boolean requireInitialRemoteConfigEnabled

Flag indicating whether the SDK will wait for an initial remote config instead of falling back on default API URLs.

Defaults to true.

public final List<String> urlAllowList

Additional URLs that will be added to the allow list for both SCOPE_OPEN_URL and SCOPE_JAVASCRIPT_INTERFACE scopes. See addEntry(String) for valid URL patterns.

public final List<String> urlAllowListScopeJavaScriptInterface

Additional URLs that will be added to the allow list for scope SCOPE_JAVASCRIPT_INTERFACE. See addEntry(String) for valid URL patterns.

public final List<String> urlAllowListScopeOpenUrl

Additional URLs that will be added to the allow list for scope SCOPE_OPEN_URL. See addEntry(String) for valid URL patterns.

Public Methods

public static AirshipConfigOptions.Builder newBuilder ()

Factory method to create an AirshipConfig builder.

Returns
  • A new builder.

public void validate ()

Validates the config.

Throws
IllegalArgumentException if the app key or secret are invalid.