java.lang.Object | |
↳ | com.urbanairship.AirshipConfigOptions.Builder |
Airship config builder.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public int | enabledFeatures |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builder() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AirshipConfigOptions.Builder |
applyConfig(Context context, int xmlResourceId)
Apply options from a xml resource file.
| ||||||||||
AirshipConfigOptions.Builder |
applyDefaultProperties(Context context)
Apply the options from the default properties file
airshipconfig.properties . | ||||||||||
AirshipConfigOptions.Builder |
applyProperties(Context context, String propertiesFile)
Apply the options from a given properties file.
| ||||||||||
AirshipConfigOptions.Builder |
applyProperties(Context context, Properties properties)
Applies properties from a given Properties object.
| ||||||||||
AirshipConfigOptions |
build()
Builds the config options.
| ||||||||||
AirshipConfigOptions.Builder |
detectProvisioningMode(Context context)
Automatically determine the provisioning mode of the application.
| ||||||||||
AirshipConfigOptions.Builder |
setAllowedTransports(String[] allowedTransports)
Set the transport types allowed for Push.
| ||||||||||
AirshipConfigOptions.Builder |
setAnalyticsEnabled(boolean analyticsEnabled)
Set the flag indicating whether the application will use analytics.
| ||||||||||
AirshipConfigOptions.Builder |
setAppKey(String appKey)
Set the default app key.
| ||||||||||
AirshipConfigOptions.Builder |
setAppSecret(String appSecret)
Set the default app secret.
| ||||||||||
AirshipConfigOptions.Builder |
setAppStoreUri(Uri appStoreUri)
Sets the app store URI for the rate-app action.
| ||||||||||
AirshipConfigOptions.Builder |
setAutoLaunchApplication(boolean autoLaunchApplication)
Set the 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.
| ||||||||||
AirshipConfigOptions.Builder |
setBackgroundReportingIntervalMS(long backgroundReportingIntervalMS)
Set the background reporting interval.
| ||||||||||
AirshipConfigOptions.Builder |
setChannelCaptureEnabled(boolean channelCaptureEnabled)
Set the flag indicating whether channel capture feature is enabled or not.
| ||||||||||
AirshipConfigOptions.Builder |
setChannelCreationDelayEnabled(boolean channelCreationDelayEnabled)
Set the flag indicating whether channel creation delay is enabled or not.
| ||||||||||
AirshipConfigOptions.Builder |
setChatSocketUrl(String chatSocketUrl)
Set the chat socket URL.
| ||||||||||
AirshipConfigOptions.Builder |
setChatUrl(String chatUrl)
Set the chat URL.
| ||||||||||
AirshipConfigOptions.Builder |
setDataCollectionOptInEnabled(boolean dataCollectionOptInEnabled)
This method is deprecated.
Use
enabledFeatures instead.
| ||||||||||
AirshipConfigOptions.Builder |
setDevelopmentAppKey(String developmentAppKey)
Set the application's development app key.
| ||||||||||
AirshipConfigOptions.Builder |
setDevelopmentAppSecret(String developmentAppSecret)
Set the application's development app secret.
| ||||||||||
AirshipConfigOptions.Builder |
setDevelopmentLogLevel(int developmentLogLevel)
Set the logger level when the application is in debug mode.
| ||||||||||
AirshipConfigOptions.Builder |
setEnabledFeatures(int... enabledFeatures)
Sets the default enabled SDK features.
| ||||||||||
AirshipConfigOptions.Builder |
setExtendedBroadcastsEnabled(boolean extendedBroadcastsEnabled)
Set the flag indicating whether extended broadcasts are enabled or disabled.
| ||||||||||
AirshipConfigOptions.Builder |
setFcmFirebaseAppName(String fcmFirebaseAppName)
Sets the Firebase app name that is used for FCM.
| ||||||||||
AirshipConfigOptions.Builder |
setInProduction(boolean inProduction)
Set the flag indicating whether the application is in production or development.
| ||||||||||
AirshipConfigOptions.Builder |
setInitialConfigUrl(String initialConfigUrl)
The Airship URL used to pull the initial config.
| ||||||||||
AirshipConfigOptions.Builder |
setLogLevel(int logLevel)
Set the default logger level.
| ||||||||||
AirshipConfigOptions.Builder |
setNotificationAccentColor(int notificationAccentColor)
Sets the default notification accent color.
| ||||||||||
AirshipConfigOptions.Builder |
setNotificationChannel(String channel)
Sets the default notification channel.
| ||||||||||
AirshipConfigOptions.Builder |
setNotificationIcon(int notificationIcon)
Sets the default notification Icon.
| ||||||||||
AirshipConfigOptions.Builder |
setNotificationLargeIcon(int notificationLargeIcon)
Sets the large notification Icon.
| ||||||||||
AirshipConfigOptions.Builder |
setProductionAppKey(String productionAppKey)
Set the application's production app key.
| ||||||||||
AirshipConfigOptions.Builder |
setProductionAppSecret(String productionAppSecret)
Set the application's production app secret.
| ||||||||||
AirshipConfigOptions.Builder |
setProductionLogLevel(int productionLogLevel)
Set the logger level when the application is in production mode.
| ||||||||||
AirshipConfigOptions.Builder |
setRequireInitialRemoteConfigEnabled(boolean requireInitialRemoteConfigEnabled)
Sets the flag to require initial remote-config for device URLs.
| ||||||||||
AirshipConfigOptions.Builder |
setSite(String site)
Sets the Airship cloud site for data locality.
| ||||||||||
AirshipConfigOptions.Builder |
setSuppressAllowListError(boolean suppressAllowListError)
Sets the flag suppressing the error normally generated when no allow list entries have been added to allowList or allowListScopeOpenUrl.
| ||||||||||
AirshipConfigOptions.Builder |
setUrlAllowList(String[] urlAllowList)
Set the list of additional 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.
| ||||||||||
AirshipConfigOptions.Builder |
setUrlAllowListScopeJavaScriptInterface(String[] urlAllowListScopeJavaScriptInterface)
Set the list of additional URLs that are allowed to be used for the Airship JS interface.
| ||||||||||
AirshipConfigOptions.Builder |
setUrlAllowListScopeOpenUrl(String[] urlAllowListScopeOpenUrl)
Set the list of additional URLs that are allowed to be used for the open external URL action.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Apply options from a xml resource file. The XML file must contain the element AirshipConfigOptions
and any public AirshipConfigOptions
fields should be set as attributes on the element.
Example:
<AirshipConfigOptions
notificationIcon = "@drawable/ic_notification"
notificationAccentColor = "@color/color_accent"
inProduction = "false"
productionAppKey = "Your Production App Key"
productionAppSecret = "Your Production App Secret"
productionLogLevel = "NONE"
developmentAppKey = "Your Development App Key"
developmentAppSecret = "Your Development App Secret"
developmentLogLevel = "VERBOSE"
context | The application context. |
---|---|
xmlResourceId | The xml resource ID. |
Apply the options from the default properties file airshipconfig.properties
.
context | The application context |
---|
Apply the options from a given properties file. The properties file should
be available in the assets directory. The properties file can define any of the
public AirshipConfigOptions
fields. Example:
# App Credentials
developmentAppKey = Your Development App Key
developmentAppSecret = Your Development App Secret
productionAppKey = Your Production App Key
productionAppSecret = Your Production Secret
# Flag to indicate what credentials to use
inProduction = false
# Log levels
developmentLogLevel = DEBUG
productionLogLevel = ERROR
# Notification settings
notificationIcon = ic_notification
notificationAccentColor = #ff0000
context | The application context. |
---|---|
propertiesFile | The name of the properties file in the assets directory. |
Applies properties from a given Properties object.
context | The application context. |
---|---|
properties | The properties |
Automatically determine the provisioning mode of the application.
context | The application context. |
---|
Set the transport types allowed for Push.
allowedTransports | The transport types allowed for Push. |
---|
Set the flag indicating whether the application will use analytics.
analyticsEnabled | The flag indicating whether the application will use analytics. |
---|
Set the default app key. The development and production app keys will take precedence if defined depending on how the inProduction flag is set.
appKey | The application's app key. |
---|
Set the default app secret. The development and production app secret will take precedence if defined depending on how the inProduction flag is set.
appSecret | The application's production app secret. |
---|
Sets the app store URI for the rate-app action. If not set, the action will generate it using the app's current package name.
Example: "market://details?id=com.example.android"
appStoreUri | The app store URI. |
---|
Set the 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.
autoLaunchApplication | The auto launch flag. |
---|
Set the background reporting interval.
backgroundReportingIntervalMS | The background reporting interval. |
---|
Set the flag indicating whether channel capture feature is enabled or not.
channelCaptureEnabled | The flag indicating whether channel capture feature is enabled or not. |
---|
Set the flag indicating whether channel creation delay is enabled or not.
channelCreationDelayEnabled | The flag indicating whether channel creation delay is enabled or not. |
---|
Set the chat socket URL.
chatSocketUrl | The chat socket URL. |
---|
Set the chat URL.
chatUrl | The chat URL. |
---|
This method is deprecated.
Use enabledFeatures
instead.
Set the flag indicating whether data collection needs to be opted in with
setDataCollectionEnabled(boolean)
.
This flag will only take affect on first run. If previously not enabled, the device
will still have data collection enabled until disabled with setDataCollectionEnabled(boolean)
.
dataCollectionOptInEnabled | The flag indicating whether data collection needs to be opted in. |
---|
Set the application's development app key.
developmentAppKey | The application's development app key. |
---|
Set the application's development app secret.
developmentAppSecret | The application's development app secret. |
---|
Set the logger level when the application is in debug mode.
developmentLogLevel | The logger level. |
---|
Sets the default enabled SDK features. See PrivacyManager
for more info.
enabledFeatures | The enabled features. |
---|
Set the flag indicating whether extended broadcasts are enabled or disabled. 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.
extendedBroadcastsEnabled | The flag indicating whether extended broadcasts are enabled or disabled. |
---|
Sets the Firebase app name that is used for FCM. If set, the app name must exist in order for Airship to get registration token. The app should be initialized with Firebase before takeOff, or during onAirshipReady callback.
fcmFirebaseAppName | The firebase app name. |
---|
Set the flag indicating whether the application is in production or development.
inProduction | The flag indicating whether the application is in production or development. |
---|
The Airship URL used to pull the initial config. This should only be set if you are using custom domains that forward to Airship.
Set the default logger level. The development and production log level will take precedence if defined depending on how the inProduction flag is set.
logLevel | The logger level. |
---|
Sets the default notification accent color.
notificationAccentColor | The notification accent color. |
---|
Sets the default notification channel.
channel | The notification channel. |
---|
Sets the default notification Icon.
See setSmallIcon(int)
.
notificationIcon | The notification icon. |
---|
Sets the large notification Icon.
See setLargeIcon(int)
.
notificationLargeIcon | The large notification icon. |
---|
Set the application's production app key.
productionAppKey | The application's production app key. |
---|
Set the application's production app secret.
productionAppSecret | The application's production app secret. |
---|
Set the logger level when the application is in production mode.
productionLogLevel | The logger level. |
---|
Sets the flag to require initial remote-config for device URLs.
requireInitialRemoteConfigEnabled | true to require initial remote-config, otherwise false . |
---|
Sets the Airship cloud site for data locality.
site | The airship cloud site. |
---|
Sets the flag suppressing the error normally generated when no allow list entries have been added to allowList or allowListScopeOpenUrl.
suppressAllowListError | true to supress the allow list warning, otherwise false . |
---|
Set the list of additional 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.
urlAllowList | The urlAllowList. |
---|
Set the list of additional URLs that are allowed to be used for the Airship JS interface. Airship https URLs are included by default.
urlAllowListScopeJavaScriptInterface | The URL allow list for the Airship JS interface. |
---|
Set the list of additional URLs that are allowed to be used for the open external URL action. Airship https URLs are included by default.
urlAllowListScopeOpenUrl | The URL allow list for the open external URL action. |
---|