Mobile SDK Android: EPZPromoConfiguration
From ePrize Developers Wiki
(Adding correct content.) |
m (Minor formatting updates) |
||
Line 11: | Line 11: | ||
- | + | <hr/> | |
=== appendEndpointURLWithData === | === appendEndpointURLWithData === | ||
Line 24: | Line 24: | ||
- | + | <hr/> | |
=== getConfigKey === | === getConfigKey === | ||
Line 35: | Line 35: | ||
- | + | <hr/> | |
=== getConfigType === | === getConfigType === | ||
Line 46: | Line 46: | ||
- | + | <hr/> | |
=== getDisplayURL === | === getDisplayURL === | ||
Line 57: | Line 57: | ||
- | + | <hr/> | |
=== getEndpointURL === | === getEndpointURL === | ||
Line 68: | Line 68: | ||
- | + | <hr/> | |
=== getPromoTitle === | === getPromoTitle === | ||
Line 79: | Line 79: | ||
- | + | <hr/> | |
=== getAssetURLs === | === getAssetURLs === | ||
Line 92: | Line 92: | ||
- | + | <hr/> | |
=== getOpenInNativeBrowser === | === getOpenInNativeBrowser === | ||
Line 103: | Line 103: | ||
- | + | <hr/> | |
=== getEndDate === | === getEndDate === | ||
Line 114: | Line 114: | ||
- | + | <hr/> | |
=== getLaunchDate === | === getLaunchDate === |
Current revision
Contents |
Overview
The EPZPromoConfiguration class stores all necessary information specific to a promotion. You can use an instance of this class to gain access to all of the applicable pieces of information you’ll need for reference, display, and functionality.
Public Methods
resetEndpointURL
public void resetEndpointURL()
Method that resets the configuration's endpoint URL to the default value, removing any additional data that may have been added via the appendEndpointURLWithData method.
appendEndpointURLWithData
public String appendEndpointURLWithData(Map<String, String> data)
Method that appends a configuration's endpoint URL with additional data (which is added via query parameters).
Parameters
data A map of String key/value pairs to be added to the endpoint URL.
getConfigKey
public String getConfigKey()
Returns
String The configuration's key. This key is used to pass in to various methods, such as the EPZPromoLibrary launchPromotionForKey() method.
getConfigType
public String getConfigType()
Returns
String The promotion’s configuration type. As of version 1.0, the only value for this property is “mobileSdkV1”. This property serves little value outside of the core SDK logic.
getDisplayURL
public String getDisplayURL()
Returns
String The promotion’s URL, targeted for display. For instance, if a promotion uses a vanity URL, the vanity URL can be the value for this property. Similarly, if a promotion URL has query parameters attached to the URL that are not intended for display, this value may crop off the parameters, resulting in a URL that is more pleasing to the eye.
getEndpointURL
public String getEndpointURL()
Returns
String The promotion’s full URL. Unlike the display URL, this value may include additional URL information such as query parameters, or a URL that is masked by a vanity URL.
getPromoTitle
public String getPromoTitle()
Returns
String The promotion's title.
getAssetURLs
public Map<String, String> getAssetURLs()
Returns
Map<String, String> of the promotion’s asset URLs, as configured in the ePrize Configuration Service.
Important Note: There are no set or default key values for this property, as all asset URLs are the responsibility of the party who configures the promotion in the ePrize Configuration Service. As such, if you choose to use asset URLs, it is recommended to do conditional checks for the existence of any map keys you attempt to use, to avoid null values and/or crashes.
getOpenInNativeBrowser
public Boolean getOpenInNativeBrowser()
Returns
Boolean flag alerting whether the site is intended to launch in a device’s native browser. If true, the promotion will launch in the device's native browser rather than in the built-in EPZPromoWebViewController. This logic is handled automatically by the SDK in the launchPromotionForKey() method.
getEndDate
public Date getEndDate()
Returns
Date The promotion’s end date. If you would like to know and/or display the end date for a promotion, you can use this property to get the value, and then use it as necessary.
getLaunchDate
public Date getLaunchDate()
Returns
Date The promotion’s launch date. If you would like to know and/or display the launch date for a promotion, you can use this property to get the value, and then use it as necessary.