Public Member Functions | |
delegate void | OnConnectSuccessHandler () |
Delegate to be called when the SDK is connected. | |
delegate void | OnConnectFailedHandler (int code, string message) |
Delegate to be called when the SDK fails to connect. | |
delegate void | OnConnectWarningHandler (int code, string message) |
Delegate to be called when the SDK returns a warning. | |
delegate void | OnSetUserIDSuccessHandler () |
Delegate to be called when the SDK has set User ID. | |
delegate void | OnSetUserIDFailedHandler (int code, string errorMessage) |
Delegate to be called when the SDK fails to set User ID. | |
delegate void | OnSetUserIDFailureHandler (string errorMessage) |
Delegate to be called when the SDK fails to set User ID. | |
delegate void | OnGetCurrencyBalanceResponseHandler (string currencyName, int balance) |
Delegate to be called with virtual currency name and total balance information when GetCurrencyBalance is successful. | |
delegate void | OnGetCurrencyBalanceResponseFailureHandler (string errorMessage) |
Delegate to be notified error message if GetCurrencyBalance fails. | |
delegate void | OnSpendCurrencyResponseHandler (string currencyName, int balance) |
Delegate to be called with virtual currency name and total balance information when SpendCurrency is successful. | |
delegate void | OnSpendCurrencyResponseFailureHandler (string errorMessage) |
Delegate to be notified error message if SpendCurrency fails. | |
delegate void | OnAwardCurrencyResponseHandler (string currencyName, int balance) |
Delegate to be called with virtual currency name and total balance information when AwardCurrency is successful. | |
delegate void | OnAwardCurrencyResponseFailureHandler (string errorMessage) |
Delegate to be notified error message if AwardCurrency fails. | |
delegate void | OnEarnedCurrencyHandler (string currencyName, int amount) |
Delegate to be called whenever virtual currency has been earned. | |
Static Public Member Functions | |
static void | Connect () |
Connect to the Tapjoy SDK If Tapjoy fails to connect due to a network issue, you can try connecting later by yourself using this method. | |
static void | Connect (string sdkKey) |
Connect to the Tapjoy SDK with Tapjoy sdkKey. | |
static void | Connect (string sdkKey, Dictionary< string, System.Object > connectFlags) |
Connect to the Tapjoy SDK with Tapjoy sdkKey. | |
static void | SetDebugEnabled (bool enable) |
Enables the debug mode of the SDK. | |
static void | OptOutAdvertisingID (bool optOut) |
Restricts access to Google AdvertisingID. | |
static void | ActionComplete (string actionID) |
Informs the Tapjoy server that the specified Pay-Per-Action was completed. Should be called whenever a user completes an in-game action. | |
static void | SetUserID (string userId) |
Sets the identifier of the user. | |
static string | GetUserID () |
Gets the identifier of the user. | |
static void | SetCustomParameter (string customParam) |
Assigns a custom parameter associated with any following placement requests that contains an ad type. | |
static string | GetCustomParameter () |
Returns the currently set custom parameter. | |
static void | SetUserLevel (int userLevel) |
Sets the level of the user. | |
static int | GetUserLevel () |
Returns the level of the user. | |
static void | SetMaxLevel (int maxUserLevel) |
Sets the maximum level of the user. | |
static int | GetMaxLevel () |
Gets the maximum level of the user. | |
static void | SetUserSegment (TJSegment userSegment) |
static TJSegment | GetUserSegment () |
static double | GetScreenScale () |
static void | ClearUserTags () |
Removes all tags from the user. | |
static List< string > | GetUserTags () |
Get all tags from the user. | |
static void | AddUserTag (string tag) |
Adds the given tag to the user if it is not already present. | |
static void | RemoveUserTag (string tag) |
Removes the given tag from the user if it is present. | |
static void | TrackPurchase (string currencyCode, double productPrice) |
Tracks the purchase. | |
static void | TrackPurchase (string productId, string currencyCode, double productPrice, string campaignId=null) |
Tracks the purchase. | |
static void | TrackPurchaseInGooglePlayStore (string skuDetails, string purchaseData, string dataSignature, string campaignId=null) |
Tracks a purchase with JSON data from the Google Play store. Also performs In-app Billing validation if purchaseData and dataSignature are given. | |
static void | TrackPurchaseInAppleAppStore (string productId, string currencyCode, double productPrice, string transactionId, string campaignId=null) |
Tracks a purchase from the Apple App Store. | |
static void | AwardCurrency (int amount) |
Awards virtual currency. | |
static void | GetCurrencyBalance () |
Gets the virtual currency data from the server for this device. | |
static void | SpendCurrency (int amount) |
Spends virtual currency. | |
static string | GetSupportURL () |
Returns URL to Tapjoy support web page. This will use your default currency. | |
static string | GetSupportURL (string currencyID) |
Returns URL to Tapjoy support web page for specified currency You can get your currencyId from the Tapjoy Dashboard under the currency section. | |
static void | ShowDefaultEarnedCurrencyAlert () |
Shows default alert that tells the user how much currency they just earned. | |
Properties | |
static string | Version [get] |
Returns the version name of the SDK. | |
static bool | IsConnected [get, set] |
Checks if SDK is connected. | |
|
inlinestatic |
Informs the Tapjoy server that the specified Pay-Per-Action was completed. Should be called whenever a user completes an in-game action.
actionID | The action ID of the completed action |
|
inlinestatic |
Adds the given tag to the user if it is not already present.
tag | the tag to be added |
|
inlinestatic |
Awards virtual currency.
This can only be used for currency managed by Tapjoy. The data will be delivered to the delegates subscribing OnAwardCurrencyResponse and OnAwardCurrencyResponseFailure
amount | Amount of the currency |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Connect to the Tapjoy SDK with Tapjoy sdkKey.
Make sure to pass in the correct sdkKey based on platform. Connect settings are defaulty taken from the Tapjoy Unity Editor window, but can be overriden / set dynamically using connectFlags. The result of the call is passed via OnConnectSuccess or OnConnectFailed.
sdkKey | Tapjoy sdkKey to use for this connect |
|
inlinestatic |
Gets the virtual currency data from the server for this device.
The data will be delivered to the delegates subscribing OnGetCurrencyBalanceResponse and OnGetCurrencyBalanceResponseFailure
|
inlinestatic |
Returns the currently set custom parameter.
|
inlinestatic |
Gets the maximum level of the user.
|
inlinestatic |
Returns URL to Tapjoy support web page. This will use your default currency.
|
inlinestatic |
Returns URL to Tapjoy support web page for specified currency You can get your currencyId from the Tapjoy Dashboard under the currency section.
currencyId | the app's currency id |
|
inlinestatic |
Gets the identifier of the user.
|
inlinestatic |
Returns the level of the user.
delegate void TapjoyUnity.Tapjoy.OnAwardCurrencyResponseFailureHandler | ( | string | errorMessage | ) |
Delegate to be notified error message if AwardCurrency fails.
errorMessage | The error message for a failed request |
delegate void TapjoyUnity.Tapjoy.OnAwardCurrencyResponseHandler | ( | string | currencyName, |
int | balance ) |
Delegate to be called with virtual currency name and total balance information when AwardCurrency is successful.
currencyName | The name of the virtual currency. |
balance | Currency balance. |
delegate void TapjoyUnity.Tapjoy.OnConnectFailedHandler | ( | int | code, |
string | message ) |
Delegate to be called when the SDK fails to connect.
code | The error code. |
message | The error message. |
delegate void TapjoyUnity.Tapjoy.OnConnectWarningHandler | ( | int | code, |
string | message ) |
Delegate to be called when the SDK returns a warning.
code | The warning code. |
message | The warning message. |
delegate void TapjoyUnity.Tapjoy.OnEarnedCurrencyHandler | ( | string | currencyName, |
int | amount ) |
Delegate to be called whenever virtual currency has been earned.
This can get called on a GetCurrencyBalance call.
currencyName | Virtual currency name |
amount | Amount of virtual currency earned (delta). |
delegate void TapjoyUnity.Tapjoy.OnGetCurrencyBalanceResponseFailureHandler | ( | string | errorMessage | ) |
Delegate to be notified error message if GetCurrencyBalance fails.
errorMessage | The error message for a failed request |
delegate void TapjoyUnity.Tapjoy.OnGetCurrencyBalanceResponseHandler | ( | string | currencyName, |
int | balance ) |
Delegate to be called with virtual currency name and total balance information when GetCurrencyBalance is successful.
currencyName | The name of the virtual currency. |
balance | Currency balance. |
delegate void TapjoyUnity.Tapjoy.OnSetUserIDFailedHandler | ( | int | code, |
string | errorMessage ) |
Delegate to be called when the SDK fails to set User ID.
code | The code of the error |
errorMessage | The message of the error |
delegate void TapjoyUnity.Tapjoy.OnSetUserIDFailureHandler | ( | string | errorMessage | ) |
Delegate to be called when the SDK fails to set User ID.
delegate void TapjoyUnity.Tapjoy.OnSpendCurrencyResponseFailureHandler | ( | string | errorMessage | ) |
Delegate to be notified error message if SpendCurrency fails.
errorMessage | The error message for a failed request |
delegate void TapjoyUnity.Tapjoy.OnSpendCurrencyResponseHandler | ( | string | currencyName, |
int | balance ) |
Delegate to be called with virtual currency name and total balance information when SpendCurrency is successful.
currencyName | The name of the virtual currency. |
balance | Currency balance. |
|
inlinestatic |
Restricts access to Google AdvertisingID.
optOut | True will prevent Tapjoy from accessing the devices AdvertisingID, False (default) will allow access |
|
inlinestatic |
Removes the given tag from the user if it is present.
tag | the tag to be removed |
|
inlinestatic |
Assigns a custom parameter associated with any following placement requests that contains an ad type.
We will return this value on the currency callback. Only applicable for publishers who manage their own currency servers. This value does NOT get unset with each subsequent placement request.
customParam | The custom parameter to assign to this device |
|
inlinestatic |
Enables the debug mode of the SDK.
enable | set to true if logging should be enabled false to disable logging |
|
inlinestatic |
Sets the maximum level of the user.
maxUserLevel | the maximum level |
|
inlinestatic |
Sets the identifier of the user.
userId | the identifier of the user |
|
inlinestatic |
Sets the level of the user.
userLevel | the level of the user |
|
inlinestatic |
Spends virtual currency.
This can only be used for currency managed by Tapjoy. The data will be delivered to the delegates subscribing OnSpendCurrencyResponse and OnSpendCurrencyResponseFailure
amount | Amount of the currency |
|
inlinestatic |
Tracks the purchase.
currencyCode | the currency code of price as an alphabetic currency code specified in ISO 4217, i.e. "USD", "KRW" |
productPrice | the price of product |
|
inlinestatic |
Tracks the purchase.
productId | the product identifier |
currencyCode | the currency code of price as an alphabetic currency code specified in ISO 4217, i.e. "USD", "KRW" |
productPrice | the price of product |
campaignId | the campaign id of the purchase ActionRequest which initiated this purchase, can be null |
|
inlinestatic |
Tracks a purchase from the Apple App Store.
productId | the identifier of product |
currencyCode | the currency code of price as an alphabetic currency code specified in ISO 4217, i.e. "USD", "KRW" |
price | the price of product |
transactionId | the identifier of iap transaction, if this is given, we will check receipt validation. (Available in iOS 7.0 and later) |
campaignId | the campaign id of the purchase request which initiated this purchase, can be null |
|
inlinestatic |
Tracks a purchase with JSON data from the Google Play store. Also performs In-app Billing validation if purchaseData and dataSignature are given.
skuDetails | a String in JSON Object format that contains product item details (according to Specification on Google Play) |
purchaseData | a String in JSON format that contains details about the purchase order. Use null not to use validation. |
dataSignature | String containing the signature of the purchase data that the developer signed with their private key. Use null not to use validation. |
campaignId | the campaign id of the Purchase Action Request if it initiated this purchase, can be null |
|
staticgetset |
Checks if SDK is connected.
|
staticget |
Returns the version name of the SDK.
|
staticaddremove |
Event for OnSetUserIDFailureHandler.