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

Constants
String ADM_TRANSPORT The ADM transport type for Push.
String GCM_TRANSPORT The GCM transport type for Push.
Fields
public String[] additionalGCMSenderIds This field is deprecated. Marked to be removed in 7.0.0. Register additional sender IDs directly with GCM using InstanceID.getInstance(context).getToken(senderId, GoogleCloudMessaging.INSTANCE_ID_SCOPE, null).
public String[] allowedTransports The transport types allowed for Push.
public boolean analyticsEnabled Flag indicating whether the application will use analytics.
public String analyticsServer The Analytics Server.
public 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 long backgroundReportingIntervalMS Minimum delta in milliseconds between analytics uploads when adding location events while in the background.
public boolean channelCaptureEnabled Flag indicating whether channel capture feature is enabled or not.
public boolean channelCreationDelayEnabled Flag indicating whether channel creation delay is enabled or not.
public boolean clearNamedUser Flag indicating whether to clear an existing named user during a re-install.
public String developmentAppKey The application's development app key.
public String developmentAppSecret The application's development app secret.
public int developmentLogLevel Logger level when the application is in debug mode.
public String gcmSender The sender ID used to send GCM pushes.
public String hostURL The Urban Airship URL.
public boolean inProduction Flag indicating whether the application is in production or development.
public String landingPageContentURL The landing page content URL.
public int minSdkVersion This field is deprecated. Will be removed in 7.0.0. No longer used.
public String productionAppKey The application's production app key.
public String productionAppSecret The application's production app secret.
public int productionLogLevel Logger level when the application is in production mode.
public String[] whitelist List of additional url patterns that will be allowed access to the Urban Airship Javascript Interface (Urban Airship https URLs are included by default).
Public Constructors
AirshipConfigOptions()
Public Methods
String getAppKey()
Returns the appropriate development or production app key
String getAppSecret()
Returns the appropriate development or production app secret
Set<String> getGCMSenderIds()
This method is deprecated. Marked to be removed in 7.0.0.
int getLoggerLevel()
Returns the appropriate development or production log level.
boolean isTransportAllowed(String transport)
Check to see if the specified transport type is allowed.
boolean isValid()
static AirshipConfigOptions loadDefaultOptions(Context ctx)
Convenience method for loading the default options from a properties file
void loadFromProperties(Context ctx, String propertiesFile)
Load the options from a given properties file
void loadFromProperties(Context ctx)
Load the options from the default properties file
[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 GCM_TRANSPORT

The GCM transport type for Push.

Constant Value: "GCM"

Fields

public String[] additionalGCMSenderIds

This field is deprecated.
Marked to be removed in 7.0.0. Register additional sender IDs directly with GCM using InstanceID.getInstance(context).getToken(senderId, GoogleCloudMessaging.INSTANCE_ID_SCOPE, null).

Additional sender IDs to register with GCM. Only messages sent from the sender gcmSender will be handled by Urban Airship.

public String[] allowedTransports

The transport types allowed for Push.

Defaults to ADM, GCM.

public boolean analyticsEnabled

Flag indicating whether the application will use analytics.

The flag defaults to true.

public String analyticsServer

The Analytics Server. This will always be set to https://combine.urbanairship.com/

public 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 long backgroundReportingIntervalMS

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

Defaults to 15 minutes.

public boolean channelCaptureEnabled

Flag indicating whether channel capture feature is enabled or not.

The flag defaults to true.

public boolean channelCreationDelayEnabled

Flag indicating whether channel creation delay is enabled or not.

The flag defaults to false.

public boolean clearNamedUser

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

Defaults to false.

public String developmentAppKey

The application's development app key.

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

public String developmentAppSecret

The application's development app secret.

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

public int developmentLogLevel

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

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

Defaults to DEBUG

public String gcmSender

The sender ID used to send GCM pushes. This is your Google API project number.

public String hostURL

The Urban Airship URL. This will always be set to http://device-api.urbanairship.com/

public boolean inProduction

Flag indicating whether the application is in production or development.

Defaults to false.

public String landingPageContentURL

The landing page content URL. This will always be set to https://dl.urbanairship.com/aaa/

public int minSdkVersion

This field is deprecated.
Will be removed in 7.0.0. No longer used.

The minSdkVersion is the minimum Android API Level required for the application to run. Defaults to 4 (DONUT)

public String productionAppKey

The application's production app key.

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

public String productionAppSecret

The application's production app secret.

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

public int productionLogLevel

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

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

Defaults to ERROR

public String[] whitelist

List of additional url patterns that will be allowed access to the Urban Airship Javascript Interface (Urban Airship https URLs are included by default). See addEntry(String) for valid url patterns.

Defaults null.

Public Constructors

public AirshipConfigOptions ()

Public Methods

public String getAppKey ()

Returns the appropriate development or production app key

Returns
  • The application key

public String getAppSecret ()

Returns the appropriate development or production app secret

Returns
  • The application secret

public Set<String> getGCMSenderIds ()

This method is deprecated.
Marked to be removed in 7.0.0.

Helper method to get the set of GCM sender IDs.

Returns
  • The set of sender IDs.

public int getLoggerLevel ()

Returns the appropriate development or production log level.

Returns
  • The log level

public boolean isTransportAllowed (String transport)

Check to see if the specified transport type is allowed.

Parameters
transport The transport type.
Returns
  • true if the transport type is allowed, otherwise false.

public boolean isValid ()

public static AirshipConfigOptions loadDefaultOptions (Context ctx)

Convenience method for loading the default options from a properties file

Parameters
ctx The application context
Returns
  • Options populated with the contents of getDefaultPropertiesFilename()

public void loadFromProperties (Context ctx, String propertiesFile)

Load the options from a given properties file

Parameters
ctx The application context
propertiesFile The properties file

public void loadFromProperties (Context ctx)

Load the options from the default properties file

Parameters
ctx The application context