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. 
@interface AirshipConfigOptions.Site  
Constants
String ADM_TRANSPORT The ADM transport type for Push.
String FCM_TRANSPORT The FCM 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 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 clearNamedUser Flag indicating whether to clear an existing named user during a re-install.
public final boolean enableUrlWhitelisting Enables/disables whitelist checks for SCOPE_OPEN_URL.
public final String fcmSenderId The FCM sender ID for push registration.
public final boolean inProduction Flag indicating whether the application is in production.
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 List<String> whitelist List of URLs that are allowed to be used for various features, including: Airship JS interface, open external URL action, wallet action, HTML in-app messages, and landing pages.
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 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 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 clearNamedUser

Flag indicating whether to clear an existing named user during a re-install.

Defaults to false.

public final boolean enableUrlWhitelisting

Enables/disables whitelist checks for SCOPE_OPEN_URL. If disabled, any URL checks with scope SCOPE_OPEN_URL will be allowed even if the URL is not in the whitelist.

Defaults to false.

public final String fcmSenderId

The FCM sender ID for push registration. Used as a fallback if the production or development FCM sender ID is not set. This is your Google API project number.

Optional if you are using `urbanairship-fcm` package and want Airship to use the main Firebase application's sender ID.

public final boolean inProduction

Flag indicating whether the application is in production.

Defaults to false.

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 List<String> whitelist

List of URLs that are allowed to be used for various features, including: Airship JS interface, open external URL action, wallet action, HTML in-app messages, and landing pages. Airship https URLs are included by default.

See addEntry(String) for valid url patterns.

Defaults null.

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.