|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nativex.monetization.MonetizationSDK
public class MonetizationSDK
The entry point for the MonetizationSDK. This manager provides methods to call different ad types and offerwalls.
Note: When the application is closing release()
should be called to release the resources allocated by this manager.
Field Summary | |
---|---|
static int |
ACTION_RATE_APP
A constant to use with the ClickListenerV2 . |
static int |
ACTION_UPGRADE_APP
A constant to use with the ClickListenerV2 . |
Constructor Summary | |
---|---|
MonetizationSDK()
|
Method Summary | |
---|---|
void |
createSession()
Establishes a session with the NativeX servers. |
void |
createSession(com.nativex.monetization.listeners.SessionListener listener)
Establishes a session with the NativeX servers. |
void |
enableLogging(boolean isEnabled)
Enables or disables debug logging. |
void |
endSession()
Ends the currently established session with the server. |
String |
getSessionId()
Checks for session id and returns it if available. |
void |
initialize(Context context,
ApplicationInputs inputs)
Standard constructor for the MonetizationSDK object. |
protected void |
initialize(Context context,
String appId,
String applicationName,
String packageName,
String publisherUserId,
com.nativex.monetization.enums.Language language,
boolean willCallCreateSession)
The initialization method called from the constructors. |
void |
redeemCurrency()
This method checks to see if there is currency available to download and handles the processing of that currency. |
void |
release()
Releases remaining memory allocation created by the offer wall. |
void |
upgradeMyApp(Activity context,
DialogInputs inputs,
com.nativex.monetization.listeners.ClickListenerBase clickListener)
Shows a message dialog urging the user to upgrade the application in the Market. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_RATE_APP
ClickListenerV2
. Corresponds to RateMyApp action.
public static final int ACTION_UPGRADE_APP
ClickListenerV2
. Corresponds to UpgradeMyApp action.
Constructor Detail |
---|
public MonetizationSDK()
Method Detail |
---|
public void initialize(Context context, ApplicationInputs inputs)
context
- The current application context.inputs
- ApplicationInputs
. Bundle that contains application data.protected void initialize(Context context, String appId, String applicationName, String packageName, String publisherUserId, com.nativex.monetization.enums.Language language, boolean willCallCreateSession)
context
- The current application context.appId
- The appId for this application.applicationName
- The name of the application.publisherUserId
- The user id for the current user. [Optional]packageName
- The package name for the application. com.something.somethingelsepublic void enableLogging(boolean isEnabled)
isEnabled
- Boolean
. true - Log is enabled, false - no log.public void release()
public void upgradeMyApp(Activity context, DialogInputs inputs, com.nativex.monetization.listeners.ClickListenerBase clickListener)
context
- Activity
. The activity to use when creating the dialog.inputs
- DialogInputs
. The data to fill the dialog with.clickListener
- ClickListenerBase
. This could be an implementation of ClickListenerV2
or ClickListenerV1
interfaces.public void redeemCurrency()
context
- Activity
. The activity is required for the dialog that will pop when the network call is completed and there are virtual currencies awarded to the user.currencyListener
- CurrencyListenerBase
. This listener may be implementation of either CurrencyListenerV1
or CurrencyListenerV2
.showMessages
- Boolean
. A flag that indicates whether to suppress or show the dialog displaying how much virtual currency the user earned.public void createSession(com.nativex.monetization.listeners.SessionListener listener)
listener
- SessionListener
. The listener that will provide callback when the CreateSession request is done.public void createSession()
public void endSession()
MonetizationManager.release()
method.
public String getSessionId()
String
. The session id generated from the server or null if not available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |