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 |
setAutoPauseInAppAutomationOnLaunch(boolean autoPauseInAppAutomationOnLaunch)
Set the auto pause In-App Automation on launch.
| ||||||||||
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 |
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 |
setIsPromptForPermissionOnUserNotificationsEnabled(boolean enabled)
Sets if when enabling
setUserNotificationsEnabled(boolean)
if the SDK should prompt for permission on Android 13+ devices. | ||||||||||
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 |
setUrlAllowList(String[] urlAllowList)
Sets the additional URLs that will be added to the allow list for both
SCOPE_OPEN_URL and
SCOPE_JAVASCRIPT_INTERFACE scopes. | ||||||||||
AirshipConfigOptions.Builder |
setUrlAllowListScopeJavaScriptInterface(String[] urlAllowListScopeJavaScriptInterface)
Sets the additional URLs that will be added to the allow list for scope
SCOPE_JAVASCRIPT_INTERFACE . | ||||||||||
AirshipConfigOptions.Builder |
setUrlAllowListScopeOpenUrl(String[] urlAllowListScopeOpenUrl)
Sets the additional URLs that will be added to the allow list for scope
SCOPE_OPEN_URL . | ||||||||||
AirshipConfigOptions.Builder |
tryApplyConfig(Context context, int xmlResourceId)
The same as
applyConfig(Context, int) , but throws an exception instead of
logging an error. | ||||||||||
AirshipConfigOptions.Builder |
tryApplyDefaultProperties(Context context)
Same as
applyDefaultProperties(Context) , but throws an exception instead of
logging an error. | ||||||||||
AirshipConfigOptions.Builder |
tryApplyProperties(Context context, Properties properties)
The same as
applyProperties(Context, Properties) , but throws an exception
instead of logging an error. | ||||||||||
AirshipConfigOptions.Builder |
tryApplyProperties(Context context, String propertiesFile)
Same as
applyProperties(Context, String) , but throws an exception instead of
logging an error. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
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 auto pause In-App Automation on launch.
autoPauseInAppAutomationOnLaunch | true to auto pause In-App Automation, otherwise false . |
---|
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. |
---|
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.
initialConfigUrl | The initial config URL. |
---|
Sets if when enabling setUserNotificationsEnabled(boolean)
if the SDK should prompt for permission on Android 13+ devices. Enabled by default.
enabled | true to prompt for notifications when user notifications are enabled, otherwise false . |
---|
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 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.
urlAllowList | An array of URL patterns. |
---|
Sets the additional URLs that will be added to the allow list for scope SCOPE_JAVASCRIPT_INTERFACE
.
See addEntry(String)
for valid URL patterns.
urlAllowListScopeJavaScriptInterface | An array of URL patterns. |
---|
Sets the additional URLs that will be added to the allow list for scope SCOPE_OPEN_URL
.
See addEntry(String)
for valid URL patterns.
urlAllowListScopeOpenUrl | An array of URL patterns. |
---|
The same as applyConfig(Context, int)
, but throws an exception instead of
logging an error.
context | The application context. |
---|---|
xmlResourceId | The xml resource ID. |
Exception |
---|
Same as applyDefaultProperties(Context)
, but throws an exception instead of
logging an error.
context | The application context |
---|
The same as applyProperties(Context, Properties)
, but throws an exception
instead of logging an error.
context | The application context. |
---|---|
properties | The properties |
Same as applyProperties(Context, String)
, but throws an exception instead of
logging an error.
context | The application context. |
---|---|
propertiesFile | The name of the properties file in the assets directory. |