|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectActivity
com.sponsorpay.sdk.android.publisher.OfferWallActivity
public class OfferWallActivity
Retrieves the SponsorPay mobile Offer Wall and shows it embedded in a WebView.
Field Summary | |
---|---|
static java.lang.String |
EXTRA_OVERRIDEN_APP_ID
Key for extracting the App ID from the extras bundle. |
static java.lang.String |
EXTRA_SHOULD_STAY_OPEN_KEY
Key for extracting the value of mShouldStayOpen from the extras bundle. |
static java.lang.String |
EXTRA_USERID_KEY
Key for extracting the current user ID from the extras bundle. |
private static java.lang.String |
LOG_TAG
|
private PublisherHostInfo |
mHostInfo
Information about the hosting application and device. |
private boolean |
mShouldStayOpen
Whether this activity should stay open or close when the user is redirected outside the application by clicking on an offer. |
private java.lang.String |
mUserId
The user ID (after extracting it from the extra) |
private WebView |
mWebView
Full-size web view within the activity |
private static java.lang.String |
OFFERWALL_PRODUCTION_BASE_URL
Sponsorpay's URL to contact within the web view |
private static java.lang.String |
OFFERWALL_STAGING_BASE_URL
|
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. |
private boolean |
SHOULD_STAY_OPEN_DEFAULT
|
Constructor Summary | |
---|---|
OfferWallActivity()
|
Method Summary | |
---|---|
protected void |
onCreate(Bundle savedInstanceState)
Overriden from Activity . |
protected void |
onResume()
Overriden from Activity . |
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. |
protected void |
showErrorDialog(SponsorPayPublisher.UIStringIdentifier error)
Displays an error dialog with the passed error message on top of the activity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String LOG_TAG
private boolean SHOULD_STAY_OPEN_DEFAULT
public static final java.lang.String EXTRA_USERID_KEY
public static final java.lang.String EXTRA_SHOULD_STAY_OPEN_KEY
mShouldStayOpen
from the extras bundle.
public static final java.lang.String EXTRA_OVERRIDEN_APP_ID
public static final int RESULT_CODE_NO_STATUS_CODE
private static final java.lang.String OFFERWALL_PRODUCTION_BASE_URL
private static final java.lang.String OFFERWALL_STAGING_BASE_URL
private WebView mWebView
private java.lang.String mUserId
private PublisherHostInfo mHostInfo
private boolean mShouldStayOpen
Constructor Detail |
---|
public OfferWallActivity()
Method Detail |
---|
protected void onCreate(Bundle savedInstanceState)
Activity
. Upon activity start, extract the user ID from the extra, create the web view and
setup the interceptor for the web view exit-request.
savedInstanceState
- Android's savedInstanceStateprotected void onResume()
Activity
. Loads or reloads the contents of the offer wall webview.
protected void showErrorDialog(SponsorPayPublisher.UIStringIdentifier error)
error
- Error message to show.private java.lang.String parseURLForProvidedURL(java.lang.String url)
url
- The exit scheme url to parse.
private int parseURLForStatusCodeViaUri(java.lang.String url)
url
- The url to parse for the status code.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |