Public Member Functions | |
delegate void | OnConnectSuccessHandler () |
Delegate to be called when the SDK is connected. | |
delegate void | OnConnectFailureHandler () |
Delegate to be called when the SDK fails to connect. | |
delegate void | OnSetUserIDSuccessHandler () |
Delegate to be called when the SDK has 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. More... | |
delegate void | OnGetCurrencyBalanceResponseFailureHandler (string errorMessage) |
Delegate to be notified error message if GetCurrencyBalance fails. More... | |
delegate void | OnSpendCurrencyResponseHandler (string currencyName, int balance) |
Delegate to be called with virtual currency name and total balance information when SpendCurrency is successful. More... | |
delegate void | OnSpendCurrencyResponseFailureHandler (string errorMessage) |
Delegate to be notified error message if SpendCurrency fails. More... | |
delegate void | OnAwardCurrencyResponseHandler (string currencyName, int balance) |
Delegate to be called with virtual currency name and total balance information when AwardCurrency is successful. More... | |
delegate void | OnAwardCurrencyResponseFailureHandler (string errorMessage) |
Delegate to be notified error message if AwardCurrency fails. More... | |
delegate void | OnEarnedCurrencyHandler (string currencyName, int amount) |
Delegate to be called whenever virtual currency has been earned. More... | |
delegate void | OnVideoStartHandler () |
Delegate to be called when a video starts playing. | |
delegate void | OnVideoErrorHandler (string errorMessage) |
Delegate to be called when a video related error occurs. More... | |
delegate void | OnVideoCompleteHandler () |
Delegate to be called when a video has completed playing. | |
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. More... | |
static void | Connect (string sdkKey) |
Connect to the Tapjoy SDK with Tapjoy sdkKey. More... | |
static void | Connect (string sdkKey, Dictionary< string, System.Object > connectFlags) |
Connect to the Tapjoy SDK with Tapjoy sdkKey. More... | |
static void | SetDebugEnabled (bool enable) |
Enables the debug mode of the SDK. More... | |
static void | SetGcmSender (string senderId) |
Sets the sender id to initiate GCM messaging registration for the your application. More... | |
static void | SubjectToGDPR (bool subject) |
This can be used by the integrating App to indicate if the user falls in any of the GDPR applicable countries (European Economic Area). More... | |
static void | SetUserConsent (string consent) |
This is used for sending User's consent to behavioral advertising such as in the context of GDPR The consent value can be "0" (User has not provided consent), "1" (User has provided consent) or a daisybit string as suggested in IAB's Transparency and Consent Framework. More... | |
static void | BelowConsentAge (bool isBelowConsentAge) |
static void | ActionComplete (string actionID) |
Informs the Tapjoy server that the specified Pay-Per-Action was completed. More... | |
static void | SetAppDataVersion (string dataVersion) |
Sets the data version of the App or Game. More... | |
static void | SetUserID (string userId) |
Sets the identifier of the user. More... | |
static void | SetUserLevel (int userLevel) |
Sets the level of the user. More... | |
static void | SetUserFriendCount (int friendCount) |
Sets the friends count of the user. More... | |
static void | SetUserCohortVariable (int variableIndex, string value) |
Sets a variable of user for the cohort analysis. More... | |
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. More... | |
static void | RemoveUserTag (string tag) |
Removes the given tag from the user if it is present. More... | |
static void | TrackEvent (string name, long value=0) |
Tracks an event of the given name without category, with a value. More... | |
static void | TrackEvent (string category, string name, long value) |
Tracks an event of the given category and name, with a value. More... | |
static void | TrackEvent (string category, string name, string parameter1, string parameter2=null, long value=0) |
Tracks an event of the given category and name, with two parameters and a value. More... | |
static void | TrackEvent (string category, string name, string parameter1, string parameter2, string value1Name, long value1, string value2Name=null, long value2=0, string value3Name=null, long value3=0) |
Tracks an event of the given category and name, with two parameters and three named values. More... | |
static void | TrackPurchase (string productId, string currencyCode, double productPrice, string campaignId=null) |
Tracks the purchase. More... | |
static void | TrackPurchaseInGooglePlayStore (string skuDetails, string purchaseData, string dataSignature, string campaignId=null) |
Tracks a purchase with JSON data from the Google Play store. More... | |
static void | TrackPurchaseInAppleAppStore (string productId, string currencyCode, double productPrice, string transactionId, string campaignId=null) |
Tracks a purchase from the Apple App Store. More... | |
static bool | IsPushNotificationDisabled () |
Returns true if the push notification is disabled when target platform is Android Returns false otherwise. | |
static void | SetPushNotificationDisabled (bool disabled) |
Sets whether the push notification is disabled. More... | |
static void | SetDeviceToken (string deviceToken) |
Set Firebase Token to initiate Firebase messaging for your application. More... | |
static void | SetReceiveRemoteNotification (Dictionary< string, string > remoteMessage) |
Set MessageReceivedEventArgs.Message data so that our SDK can display the push notification. More... | |
static void | ActivateInstallReferrerClient () |
Activates Tapjoy's client to retrieve the install referrer of app from Google Play Store. More... | |
static void | SetInstallReferrer (string referrer) |
Sets the referrer parameter for each install provided by the InstallReferrer API. More... | |
static void | AwardCurrency (int amount) |
Awards virtual currency. More... | |
static void | GetCurrencyBalance () |
Gets the virtual currency data from the server for this device. More... | |
static void | SpendCurrency (int amount) |
Spends virtual currency. More... | |
static float | GetCurrencyMultiplier () |
Gets the multiplier for the virtual currency display. More... | |
static void | SetCurrencyMultiplier (float multiplier) |
Sets the multiplier for the virtual currency displayed in Offers, Banner Ads, etc. More... | |
static string | GetSupportURL () |
Returns URL to Tapjoy support web page. More... | |
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. More... | |
static void | ShowDefaultEarnedCurrencyAlert () |
Shows default alert that tells the user how much currency they just earned. | |
|
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 |
Activates Tapjoy's client to retrieve the install referrer of app from Google Play Store.
The client setup and setting the referrer will happen only once per install. Call this when the app is launched.
|
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 |
Similarly, the GDPR imposes certain requirements in connection with data subjects who are below the applicable local minimum age for online consent (ranging from 13 to 16, as established by each member state).
For applications that are not directed towards children under 13 years of age, but still have a minority share of users known to be under the applicable minimum age, utilize this method to access Tapjoy’s monetization capability. This method will set ad_tracking_enabled to false for Tapjoy which only shows the user contextual ads. No ad tracking will be done on this user.
isBelowConsentAge | True if below consent age (COPPA) applies to this user, false otherwise |
|
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 OnConnectFailure.
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 |
Gets the multiplier for the virtual currency display.
|
inlinestatic |
|
inlinestatic |
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.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.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. |
delegate void TapjoyUnity.Tapjoy.OnVideoErrorHandler | ( | string | errorMessage | ) |
Delegate to be called when a video related error occurs.
errorMessage | Error message |
|
inlinestatic |
Removes the given tag from the user if it is present.
tag | the tag to be removed |
|
inlinestatic |
Sets the data version of the App or Game.
dataVersion | the data version |
|
inlinestatic |
Sets the multiplier for the virtual currency displayed in Offers, Banner Ads, etc.
The default is 1.0 ONLY USE FOR NON-MANAGED (by TAPJOY) CURRENCY.
multiplier | The currency multiplier |
|
inlinestatic |
Enables the debug mode of the SDK.
enable | set to true if logging should be enabled false to disable logging |
|
inlinestatic |
Set Firebase Token to initiate Firebase messaging for your application.
Call this method when the onTokenReceived callback is triggered to update the token.
deviceToken | A deviceToken is a registration token for firebase senderID and AppID to register in Tapjoy Server. It is updated through onTokenReceived callback triggered everytime Firebase update the token. |
|
inlinestatic |
Sets the sender id to initiate GCM messaging registration for the your application.
senderId | Google Project ID of the accounts authorized to send messages to your application. |
|
inlinestatic |
Sets the referrer parameter for each install provided by the InstallReferrer API.
If activateInstallReferrerClient is used, this method does not need to be used as we will call it automatically from setInstallReferrerClient.
referrer | The install referrer string from ReferrerDetails.getInstallReferrer(); |
|
inlinestatic |
Sets whether the push notification is disabled.
(Only for Android)
disabled | true to disable the push notification |
|
inlinestatic |
Set MessageReceivedEventArgs.Message data so that our SDK can display the push notification.
Call this when a message is received from Firebase through OnMessageReceived callback trigger
remoteMessage | The MessageReceivedEventArgs.Message.Data dictionary from the message received from Firebase |
|
inlinestatic |
Sets a variable of user for the cohort analysis.
variableIndex | the index of the variable to set, must be in the range 1 to 5 |
value | the value of the variable to set, or null to unset |
|
inlinestatic |
This is used for sending User's consent to behavioral advertising such as in the context of GDPR The consent value can be "0" (User has not provided consent), "1" (User has provided consent) or a daisybit string as suggested in IAB's Transparency and Consent Framework.
value | The user consent string |
|
inlinestatic |
Sets the friends count of the user.
friendCount | the number of friends |
|
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 |
This can be used by the integrating App to indicate if the user falls in any of the GDPR applicable countries (European Economic Area).
The value should be set to TRUE when User (Subject) is applicable to GDPR regulations and FALSE when User is not applicable to GDPR regulations. In the absence of this call, Tapjoy server makes the determination of GDPR applicability.
gdprApplicable | true if GDPR applies to this user, false otherwise |
|
inlinestatic |
Tracks an event of the given name without category, with a value.
name | the name of event |
value | the value of event |
|
inlinestatic |
Tracks an event of the given category and name, with a value.
category | the category of event |
name | the name of event |
value | the value of event |
|
inlinestatic |
Tracks an event of the given category and name, with two parameters and a value.
category | the category of event, can be null |
name | the name of event |
parameter1 | the value of the 1st parameter of event, can be null |
parameter2 | the value of the 2nd parameter of event, can be null |
value | the value of event |
|
inlinestatic |
Tracks an event of the given category and name, with two parameters and three named values.
category | the category of event, can be null |
name | the name of event |
parameter1 | the value of the 1st parameter of event, can be null |
parameter2 | the value of the 2nd parameter of event, can be null |
value1Name | the name of the 1st value of event |
value1 | the 1st value of event |
value2Name | the name of the 2nd value of event |
value2 | the 2nd value of event |
value3Name | the name of the 3rd value of event |
value3 | the 3rd value of event |
|
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.