Java Class Library
Overview
This page references the Java Class Library for the Example Android SDK 1.0 beta 4 release. It highlights the Java Classes, Interfaces, Methods, and Parameters that are of primary importance and use during the SDK integration process.
Click a topic to expand/collapse it ().
Class: Example
This is the default utility Class which enables and allows communication with the SDK. It extends
java.lang.Object
.
Parameters Parameter Type Description activity Activity This is an Android class representing a user experience workflow.
Field Detail Field Type Description USER_STATUS
_EXISTINGstatic java.lang.String A constant for existing casino user status. USER_STATUS
_NEWstatic java.lang.String A constant for new casino user status.
Constructor Detail Name Parameters Type Description Example activity : The current visible Activity. public
Example
(Activity activity)A constant for existing casino user status. Methods
- Methods inherited from class java.lang.Object are:
- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkUpdates()
This Method checks new updates for a game app.
deposit(Example.DepositRequestContainer container)
A container Method that allows a user to start an in-app payment form and make a deposit.
destroy()
A Method that recycles all held instances.
extUserStatus()
A Method that identifies a casino user's status.
getApiKey()
A Method that gets a game ApiKey.
getExtUserId()
A Method that returns a casino's unique external ID for their user.
init(Activity activity, int versionCode)
A Method that initializes the singleton instance of Example.
Parameters Name Type Description activity Activity This is an Android class representing a user experience workflow. init(Activity activity, java.lang.String extCasinoUserID, java.lang.String extUserStatus, int versionCode))
A Method that initializes the singleton instance of Example.
Parameters Name Type Description activity Activity This is an Android class representing a user experience workflow. onActivityResult(int requestCode, int resultCode, Intent data)
A Method for the results of activities.
Parameters Name Type Description requestCode Integer A unique request code, numeric, provided by the developer when the call was started (unused in the SDK, default for platform signature). resultCode Integer A unique result code, numeric, provided by the developer when the call was ended. data Intent The standard container used to communicate any extra data in a response from an Intent call (used by the SDK to capture external responses). onResume()
A Method for the resumption of a game.
setDepositListener(Example.DepositListener depositListener)
A Method that sets the deposit listener.
Parameters Name Type Description depositListener Example.
Deposit
ListenerA Class instance, provided by the developer at runtime.
It is any Class that implements the Interface Example.
DepositListener.setMarketListener(Example.MarketListener marketListener)
A Method that sets the market listener.
Parameters Name Type Description marketListener Example.
Market
ListenerA Class instance provided by the developer at runtime.
It is any Class that implements the Interface Example.
MarketListenersetUser(java.lang.String extCasinoUserId, java.lang.String extCasinoUserStatus)
A Method used to track casino user status.
verifyMarketAuthorization()
A Method that verifies the Example app is installed and a user is logged in.
Nested Class: Example.DepositRequestContainer
This is a container for all possible parameters related to deposit flow.
- Methods inherited from class java.lang.Object
- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods Name Modifier & Type Description getAmount() float Retrieves the amount with the addition of any bonus amount associated with a promo code. getCustomPresetAmountList() java.util.ArrayList
<com.Example.sdk.model.Amount>Retrieves a user's custom preset amount list. getExtCasinoPaymentGatewayID() java.lang.String Retrieves the unique identifier for the eWallet gateway that the casino would like Example to use for deposits. getExtCasinoTransId() java.lang.String Retrieves a unique identifier that the casino operator can pass to Example to associate with the transaction so that it can be easily retrieved later. getExtCasinoUserId() java.lang.String Retrieves a unique identifier for that user in the casino's own systems.
Used in customer care scenarios when the user needs to be identified within the casino’s system.getExtCasinoUserStatus() java.lang.String Retrieves an identifier to determine whether the user is a new user to the casino, or is an existing user. getMaximumDepositValue() java.lang.Double Retrieves the maximum allowed deposit value for the user, for this game. getMinimumDepositValue() java.lang.Double Retrieves the minimum allowed deposit value for the user, for this game. isCustomAmountAllowed() boolean Determines whether to allow the user to enter a custom deposit amount outside of the values set by the "getCustomPresetAmountLIst()" values. isCustomAmountAllowed(boolean customAmountAllowed) Example.DepositRequestContainer Determines whether to allow the user to enter a custom deposit amount outside of the values set by the "getCustomPresetAmountLIst()" values. isUserLimited() boolean Determines whether to set an upper limit on the user’s deposit values. isUserLimited(boolean userLimited) Example.DepositRequestContainer Determines whether to set an upper limit on the user’s deposit values. withAmount(float amount) Example.DepositRequestContainer Sets the amount with the addition of any bonus amount associated with a promo code. withCustomPresetAmountList(
java.util.ArrayList
<com.Example.sdk.model.Amount>
customPresetAmountList)Example.DepositRequestContainer Sets a user's custom preset amount list. withExtCasinoPaymentGatewayID(
java.lang.String extCasinoPaymentGatewayID)Example.DepositRequestContainer Sets the unique identifier for the eWallet gateway that the casino would like Example to use for deposits. withExtCasinoTransId(
java.lang.String extCasinoTransId)Example.DepositRequestContainer Sets a unique identifier that the casino operator can pass to Example to associate with the transaction so that it can be easily retrieved later. withExtCasinoUserId(
java.lang.String extCasinoUserId)Example.DepositRequestContainer Sets a unique identifier for that user in the casino's own systems.
Used in customer care scenarios when the user needs to be identified within the casino’s system.withExtCasinoUserStatus(
java.lang.String extCasinoUserStatus)Example.DepositRequestContainer Sets an identifier to determine whether the user is a new user to the casino, or is an existing user. withMaximumDepositValue(
double maximumDepositValue)Example.DepositRequestContainer Sets the maximum allowed deposit value for the user, for this game. withMinimumDepositValue(
double minimumDepositValue)Example.DepositRequestContainer Sets the minimum allowed deposit value for the user, for this game.
Nested Class Interface: Example.DepositListener
This is a nested Class Interface which enables and allows listening to deposit events.
Methods
onExampleDepositCancel(java.lang.String extCasinoPaymentGatewayID)
A Method that signals a canceled deposit.
Parameters Name Type Description extCasinoPaymentGatewayID string This is the reference to the payment gateway that the casino would like Example to run the transaction against. onExampleDepositFail(extCasinoPaymentGatewayID)
A Method that signals a failed deposit.
Parameters Name Type Description extCasinoPaymentGatewayID string This is the reference to the payment gateway that the casino would like Example to run the transaction against. onExampleDepositSuccess(extCasinoPaymentGatewayID, double deposit)
A Method that signals a successful deposit.
Parameters Name Type Description extCasinoPaymentGatewayID string This is the reference to the payment gateway that the casino would like Example to run the transaction against. deposit double Called by the SDK when a deposit is successful and returns the amount successfully deposited to the player's account as parameter deposit.
Nested Class Interface: Example.MarketListener
This is a nested class Interface used to listen for general failures.
Methods:
onExampleMarketError(errorMessage)
A Method that produces a string error message when a failure occurs.
Parameters Name Type Description errorMessage string Called by the SDK when an error has occurred during any interactions, returning an error message to the developer stating the reason.
Public Interface: OnIncentivesListener
This is a Listener for detecting if an was app launched with incentives or without incentives.
Methods Name Modifier & Type Parameters Description onReceivedIncentives(
Activity
redeemId,
redeemAppId,
redeemAmount,
redeemPercent)void
Activity
string
string
int
string![]()
redeemId
redeemAppId
redeemAmount
redeemPercentThis method will be called if an app is launched with incentives as params. onSimpleLaunch() void None. This method will be called if an app launched without incentives, or some incentive related parameters are missed.