com.sponsorpay.sdk.android.publisher
Class UrlBuilder

java.lang.Object
  extended by com.sponsorpay.sdk.android.publisher.UrlBuilder

public class UrlBuilder
extends java.lang.Object


Field Summary
private static java.lang.String APPID_KEY
          The App ID key for encoding the corresponding URL parameter.
private static java.lang.String LANGUAGE_KEY
          The default language setting key for encoding the corresponding URL parameter.
private static java.lang.String OS_VERSION_KEY
          The OS version key for encoding the corresponding URL parameter.
private static java.lang.String PHONE_VERSION_KEY
          The phone model key for encoding the corresponding URL parameter.
private static java.lang.String SDK_VERSION_KEY
          The SDK version key for encoding the corresponding URL parameter.
private static java.lang.String UDID_KEY
          The unique device ID (for url-encoding).
private static java.lang.String USERID_KEY
          The user id key for encoding the corresponding URL parameter.
 
Constructor Summary
UrlBuilder()
           
 
Method Summary
static java.lang.String buildUrl(java.lang.String baseUrl, java.lang.String mUserId, PublisherHostInfo hostInfo, java.lang.String[] extraKeys, java.lang.String[] extraValues)
          Builds a String URL with information gathered from the device and the specified parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UDID_KEY

private static final java.lang.String UDID_KEY
The unique device ID (for url-encoding).

See Also:
Constant Field Values

USERID_KEY

private static final java.lang.String USERID_KEY
The user id key for encoding the corresponding URL parameter.

See Also:
Constant Field Values

APPID_KEY

private static final java.lang.String APPID_KEY
The App ID key for encoding the corresponding URL parameter.

See Also:
Constant Field Values

OS_VERSION_KEY

private static final java.lang.String OS_VERSION_KEY
The OS version key for encoding the corresponding URL parameter.

See Also:
Constant Field Values

PHONE_VERSION_KEY

private static final java.lang.String PHONE_VERSION_KEY
The phone model key for encoding the corresponding URL parameter.

See Also:
Constant Field Values

LANGUAGE_KEY

private static final java.lang.String LANGUAGE_KEY
The default language setting key for encoding the corresponding URL parameter.

See Also:
Constant Field Values

SDK_VERSION_KEY

private static final java.lang.String SDK_VERSION_KEY
The SDK version key for encoding the corresponding URL parameter.

See Also:
Constant Field Values
Constructor Detail

UrlBuilder

public UrlBuilder()
Method Detail

buildUrl

public static java.lang.String buildUrl(java.lang.String baseUrl,
                                        java.lang.String mUserId,
                                        PublisherHostInfo hostInfo,
                                        java.lang.String[] extraKeys,
                                        java.lang.String[] extraValues)
Builds a String URL with information gathered from the device and the specified parameters.

Parameters:
baseUrl - The base for the URL to be built and returned, including schema and host.
mUserId - The user id parameter to encode in the result URL.
hostInfo - A PublisherHostInfo instance used to retrieve data about the application id and the host device.
extraKeys - An array of keys for extra parameters to en code in the result URL.
extraValues - An array of values corresponding to the provided extraKeys.
Returns:
The built URL as a String with the provided parameters encoded.