com.sponsorpay.sdk.android.publisher
Class InterstitialActivity

java.lang.Object
  extended by Activity
      extended by com.sponsorpay.sdk.android.publisher.InterstitialActivity

public class InterstitialActivity
extends Activity

Shows the SponsorPay mobile interstitial embedded in a WebView.

Will retrieve the interstitial's initial html content from the EXTRA_INITIAL_CONTENT_KEY encoded into the calling intent, and will load dependent content referenced with relative links using the base URL encoded as EXTRA_BASE_DOMAIN_KEY into the calling intent. The http cookie(s) to use will be retrieved from the String array encoded as extra EXTRA_COOKIESTRINGS_KEY

The boolean value encoded as EXTRA_SHOULD_STAY_OPEN_KEY into the calling intent will determine the activity's behavior when the user is redirected outside the application. The default behavior is to close the interstitial.


Field Summary
static java.lang.String EXTRA_BASE_DOMAIN_KEY
           
static java.lang.String EXTRA_COOKIESTRINGS_KEY
           
static java.lang.String EXTRA_INITIAL_CONTENT_KEY
           
static java.lang.String EXTRA_SHOULD_STAY_OPEN_KEY
           
private  boolean mShouldStayOpen
           
private  WebView mWebView
           
static int RESULT_CODE_NO_STATUS_CODE
          The result code that is returned when the Offer Wall's parsed exit scheme does not contain a status code.
 
Constructor Summary
InterstitialActivity()
           
 
Method Summary
private  CookieManager getCookieManagerInstance()
           
protected  void onCreate(Bundle savedInstanceState)
           
private  java.lang.String parseURLForProvidedURL(java.lang.String url)
          Extract the provided URL from the exit scheme
private  int parseURLForStatusCodeViaUri(java.lang.String url)
          Extract the status code from the scheme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTRA_SHOULD_STAY_OPEN_KEY

public static final java.lang.String EXTRA_SHOULD_STAY_OPEN_KEY
See Also:
Constant Field Values

EXTRA_INITIAL_CONTENT_KEY

public static final java.lang.String EXTRA_INITIAL_CONTENT_KEY
See Also:
Constant Field Values

EXTRA_BASE_DOMAIN_KEY

public static final java.lang.String EXTRA_BASE_DOMAIN_KEY
See Also:
Constant Field Values

EXTRA_COOKIESTRINGS_KEY

public static final java.lang.String EXTRA_COOKIESTRINGS_KEY
See Also:
Constant Field Values

RESULT_CODE_NO_STATUS_CODE

public static final int RESULT_CODE_NO_STATUS_CODE
The result code that is returned when the Offer Wall's parsed exit scheme does not contain a status code.

See Also:
Constant Field Values

mWebView

private WebView mWebView

mShouldStayOpen

private boolean mShouldStayOpen
Constructor Detail

InterstitialActivity

public InterstitialActivity()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)

getCookieManagerInstance

private CookieManager getCookieManagerInstance()

parseURLForProvidedURL

private java.lang.String parseURLForProvidedURL(java.lang.String url)
Extract the provided URL from the exit scheme

Parameters:
url - the exit scheme url to parse
Returns:
the extracted, provided & decoded URL

parseURLForStatusCodeViaUri

private int parseURLForStatusCodeViaUri(java.lang.String url)
Extract the status code from the scheme

Parameters:
url - the url to parsed for the status code
Returns:
the status code