urbanairship-core/src/main/java/com/urbanairship/AirshipConfigOptions.java
public AirshipConfigOptions build() {
            if (inProduction == null) {
                inProduction = false;
            }

            String modeString = inProduction ? "production" : "development";

            String appKey = inProduction ? productionAppKey : developmentAppKey;
            if (appKey == null || appKey.length() == 0 || appKey.indexOf(' ') > 0) {
                throw new IllegalArgumentException("AirshipConfigOptions: " + appKey + " is not a valid " + modeString + " app key");
            }

            String appSecret = inProduction ? productionAppSecret : developmentAppSecret;
            if (appSecret == null || appSecret.length() == 0 || appSecret.indexOf(' ') > 0) {
                throw new IllegalArgumentException("AirshipConfigOptions: " + appSecret + " is not a valid " + modeString + " app secret");
            }

            if (analyticsEnabled && UAStringUtil.isEmpty(analyticsServer)) {
                throw new IllegalArgumentException("Invalid config - analyticsServer is empty or null.");
            }

            if (UAStringUtil.isEmpty(hostURL)) {
                throw new IllegalArgumentException("Invalid config - hostURL is empty or null.");
            }

            if (backgroundReportingIntervalMS < MIN_BG_REPORTING_INTERVAL_MS) {
                Logger.warn("AirshipConfigOptions - The backgroundReportingIntervalMS " + backgroundReportingIntervalMS + " may decrease battery life.");
            } else if (backgroundReportingIntervalMS > MAX_BG_REPORTING_INTERVAL_MS) {
                Logger.warn("AirshipConfigOptions - The backgroundReportingIntervalMS " + backgroundReportingIntervalMS + " may provide less detailed analytic reports.");
            }

            if (productionAppKey != null && productionAppKey.equals(developmentAppKey)) {
                Logger.warn("Production App Key matches Development App Key");
            }

            if (productionAppSecret != null && productionAppSecret.equals(developmentAppSecret)) {
                Logger.warn("Production App Secret matches Development App Secret");
            }

            if (gcmSender != null) {
                Logger.warn("AirshipConfigOption's gcmSender is deprecated. Please use fcmSenderId instead.");
            }

            return new AirshipConfigOptions(this);
        }
/**
         * Builds the config options. Will fail if any of the following preconditions are not met.
         * <p/>
         * <pre>
         * 1. If inProduction is <code>false</code>, development app key and secret must be set.
         * 2. If inProduction is <code>true</code>, production app key and secret must be set.
         * 3. The analytics URI must not be empty if analytics are enabled.
         * 4. The host URL must not be empty.
         * </pre>
         *
         * @return The built config options.
         */
Builds the config options. Will fail if any of the following preconditions are not met.


1. If inProduction is false, development app key and secret must be set.
2. If inProduction is true, production app key and secret must be set.
3. The analytics URI must not be empty if analytics are enabled.
4. The host URL must not be empty.

@return The built config options.
Builds the config options . Will fail if any of the following preconditions are not met . 1 . If inProduction is false development app key and secret must be set . 2 . If inProduction is true production app key and secret must be set . 3 . The analytics URI must not be empty if analytics are enabled . 4 . The host URL must not be empty . @return The built config options .
public AirshipConfigOptions build() {
            if (inProduction == null) {
                inProduction = false;
            }
            String modeString = inProduction ? "production" : "development";
            String appKey = inProduction ? productionAppKey : developmentAppKey;
            if (appKey == null || appKey.length() == 0 || appKey.indexOf(' ') > 0) {
                throw new IllegalArgumentException("AirshipConfigOptions: " + appKey + " is not a valid " + modeString + " app key");
            }
            String appSecret = inProduction ? productionAppSecret : developmentAppSecret;
            if (appSecret == null || appSecret.length() == 0 || appSecret.indexOf(' ') > 0) {
                throw new IllegalArgumentException("AirshipConfigOptions: " + appSecret + " is not a valid " + modeString + " app secret");
            }
            if (analyticsEnabled && UAStringUtil.isEmpty(analyticsServer)) {
                throw new IllegalArgumentException("Invalid config - analyticsServer is empty or null.");
            }
            if (UAStringUtil.isEmpty(hostURL)) {
                throw new IllegalArgumentException("Invalid config - hostURL is empty or null.");
            }
            if (backgroundReportingIntervalMS < MIN_BG_REPORTING_INTERVAL_MS) {
                Logger.warn("AirshipConfigOptions - The backgroundReportingIntervalMS " + backgroundReportingIntervalMS + " may decrease battery life.");
            } else if (backgroundReportingIntervalMS > MAX_BG_REPORTING_INTERVAL_MS) {
                Logger.warn("AirshipConfigOptions - The backgroundReportingIntervalMS " + backgroundReportingIntervalMS + " may provide less detailed analytic reports.");
            }
            if (productionAppKey != null && productionAppKey.equals(developmentAppKey)) {
                Logger.warn("Production App Key matches Development App Key");
            }
            if (productionAppSecret != null && productionAppSecret.equals(developmentAppSecret)) {
                Logger.warn("Production App Secret matches Development App Secret");
            }
            if (gcmSender != null) {
                Logger.warn("AirshipConfigOption's gcmSender is deprecated. Please use fcmSenderId instead.");
            }
            return new AirshipConfigOptions(this);
        }
public AirshipConfigOptions build ( ) { if ( inProduction == null ) { inProduction = false ; } String modeString = inProduction ? "production" : "development" ; String appKey = inProduction ? productionAppKey : developmentAppKey ; if ( appKey == null || appKey . length ( ) == 0 || appKey . indexOf ( ' ' ) > 0 ) { throw new IllegalArgumentException ( "AirshipConfigOptions: " + appKey + " is not a valid " + modeString + " app key" ) ; } String appSecret = inProduction ? productionAppSecret : developmentAppSecret ; if ( appSecret == null || appSecret . length ( ) == 0 || appSecret . indexOf ( ' ' ) > 0 ) { throw new IllegalArgumentException ( "AirshipConfigOptions: " + appSecret + " is not a valid " + modeString + " app secret" ) ; } if ( analyticsEnabled && UAStringUtil . isEmpty ( analyticsServer ) ) { throw new IllegalArgumentException ( "Invalid config - analyticsServer is empty or null." ) ; } if ( UAStringUtil . isEmpty ( hostURL ) ) { throw new IllegalArgumentException ( "Invalid config - hostURL is empty or null." ) ; } if ( backgroundReportingIntervalMS < MIN_BG_REPORTING_INTERVAL_MS ) { Logger . warn ( "AirshipConfigOptions - The backgroundReportingIntervalMS " + backgroundReportingIntervalMS + " may decrease battery life." ) ; } else if ( backgroundReportingIntervalMS > MAX_BG_REPORTING_INTERVAL_MS ) { Logger . warn ( "AirshipConfigOptions - The backgroundReportingIntervalMS " + backgroundReportingIntervalMS + " may provide less detailed analytic reports." ) ; } if ( productionAppKey != null && productionAppKey . equals ( developmentAppKey ) ) { Logger . warn ( "Production App Key matches Development App Key" ) ; } if ( productionAppSecret != null && productionAppSecret . equals ( developmentAppSecret ) ) { Logger . warn ( "Production App Secret matches Development App Secret" ) ; } if ( gcmSender != null ) { Logger . warn ( "AirshipConfigOption's gcmSender is deprecated. Please use fcmSenderId instead." ) ; } return new AirshipConfigOptions ( this ) ; }
Builds the config options.
Builds the config options .