-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added support for custom domain #184
feat: Added support for custom domain #184
Conversation
@@ -67,6 +68,7 @@ class UrbanAirshipConfiguration(settings: Map<String, String>) { | |||
private const val KEY_APP_KEY = "applicationKey" | |||
private const val KEY_APP_SECRET = "applicationSecret" | |||
private const val KEY_DOMAIN = "domain" | |||
private const val KEY_INITIAL_CONFIG_URL = "initialConfigUrl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration setting key will be added to align with UI description.
private const val KEY_INITIAL_CONFIG_URL = "initialConfigUrl" | |
private const val KEY_CUSTOM_DOMAIN_PROXY_URL = "customDomainProxyUrl" |
if (settings.containsKey(KEY_INITIAL_CONFIG_URL)) { | ||
initialConfigUrl = settings[KEY_INITIAL_CONFIG_URL] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the configuration setting key change..
if (settings.containsKey(KEY_INITIAL_CONFIG_URL)) { | |
initialConfigUrl = settings[KEY_INITIAL_CONFIG_URL] | |
} | |
if (settings.containsKey(KEY_CUSTOM_DOMAIN_PROXY_URL)) { | |
initialConfigUrl = settings[KEY_CUSTOM_DOMAIN_PROXY_URL] | |
} |
@@ -10,6 +10,7 @@ class UrbanAirshipConfiguration(settings: Map<String, String>) { | |||
val applicationKey: String? | |||
val applicationSecret: String? | |||
val domain: String? | |||
val initialConfigUrl: String? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to rename this property as well.
val initialConfigUrl: String? | |
val customDomainProxyUrl: String? |
Inspection of MParticleAutopilot.kt
seems to imply that the this class is not intended to map directly to the Airship API.
val custom_domain = preferences.getString(INITIAL_CONFIG_URL, null)
If this is intended to map to the API, val custom_domain
should probably be renamed and this works.
@@ -34,6 +34,11 @@ class MParticleAutopilot : Autopilot() { | |||
if ("EU".equals(preferences.getString(DOMAIN, null), true)) { | |||
optionsBuilder.setSite(AirshipConfigOptions.SITE_EU) | |||
} | |||
val custom_domain = preferences.getString(INITIAL_CONFIG_URL, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer camel case for Android
val custom_domain = preferences.getString(INITIAL_CONFIG_URL, null) | |
val customDomain = preferences.getString(INITIAL_CONFIG_URL, null) |
24b4169
to
8909bbb
Compare
This is Glynis from the Sam's Club Platform Team! An overview on the testing that we conducted:
|
@glyn-leigh - thanks for your support with this! i've merged and this will go out with our next android release |
@rmi22186 |
@glyn-leigh this has been released, you can check at https://repo1.maven.org/maven2/com/mparticle/android-urbanairship-kit/5.55.5/ |
Summary