Update Guide
Follow the Update Guide for Android to transition between Tapjoy SDK versions—completing each prescribed step helps avoid integration errors or compatibility issues.
Read time 2 minutesLast updated 3 hours ago
This guide describes steps required when updating from one Offerwall SDK version to another, it's recommended you perform all the steps to prevent any issues or conflicts.
14.3.0
-
Replace any use of with
Tapjoy.setDebugEnabled
as the former has been deprecated.Tapjoy.setLoggingLevel(TJLogLevel.Debug)
- Log levels are: Error, Warning, Info and Debug.
-
Replace any use of with
TapjoyConnectFlag.ENABLE_LOGGING
as the former has been deprecated.TapjoyConnectFlag.TJC_OPTION_LOGGING_LEVEL
14.2.0
- Remove any use of the deprecated TJPlacementListener onClick method. It will be removed in the next major version and no longer does anything.
- Remove any use of the deprecated getSupportUrl method. It will be removed in the next major version and no longer does anything.
Manual Integration
There are two new activities to add to your manifest if you are integrating manually. These relate to the predictive back gesture.<activity android:name="com.tapjoy.TJAdUnitActivity" android:enableOnBackInvokedCallback="false" android:configChanges="orientation|keyboardHidden|screenSize" android:theme="@style/TranslucentTheme" android:hardwareAccelerated="true" tools:ignore="UnusedAttribute" /> <activity android:name="com.tapjoy.TJWebViewActivity" android:enableOnBackInvokedCallback="false" android:configChanges="orientation|keyboardHidden|screenSize" android:theme="@style/TranslucentTheme" android:hardwareAccelerated="true" tools:ignore="UnusedAttribute" />
14.0.0
- Remove any use of . It will be removed in the next major version and no longer does anything.
Tapjoy.setActivity()
- Remove any use of . It will be removed in the next major version and no longer does anything.
Tapjoy.setGLSurfaceView()
- Replace uses of the deprecated method with
Tapjoy.trackPurchase()
.trackPurchase(String currencyCode, double price)
13.4.0
We added a newconnectWarning
connectSuccess
Tapjoy.connect(getContext().getApplicationContext(), "SDK_KEY_GOES_HERE", connectFlags, new TJConnectListener() { @Override public void onConnectSuccess() { } @Override public void onConnectWarning(int code, String message) { } @Override public void onConnectFailure(int code, String message) { } });
13.2.0
Connect
We added error code & message parameters toconnectFailure
Tapjoy.connect(getContext().getApplicationContext(), "SDK_KEY_GOES_HERE", connectFlags, new TJConnectListener() { @Override public void onConnectSuccess() { super.onConnectSuccess(); } @Override public void onConnectFailure(int code, String message) { super.onConnectFailure(code, message); } @Override public void onConnectFailure() { //Deprecated super.onConnectFailure(); } });
Max User Level
It's now possible to set the number of levels in your game. It can be set before or after connect.Tapjoy.setMaxLevel(10);
User Segment
You can now set the type of user currently using your app. This can be set before or after connect, or during the session.Tapjoy.setUserSegment(TJSegment.VIP); Tapjoy.setUserSegment(TJSegment.PAYER); Tapjoy.setUserSegment(TJSegment.NON_PAYER); Tapjoy.setUserSegment(TJSegment.UNKNOWN);
Entry Point
Before calling request connect you can set the entry point. This describes where in the app the placement will be shown. You can choose from one of several preset values.TJPlacement placement = Tapjoy.getPlacement("myPlacement", null); placement.setEntryPoint(TJEntryPoint.ENTRY_POINT_MAIN_MENU); placement.requestContent(); // Available values TJEntryPoint.ENTRY_POINT_UNKNOWN TJEntryPoint.ENTRY_POINT_OTHER TJEntryPoint.ENTRY_POINT_MAIN_MENU TJEntryPoint.ENTRY_POINT_HUD TJEntryPoint.ENTRY_POINT_EXIT TJEntryPoint.ENTRY_POINT_FAIL TJEntryPoint.ENTRY_POINT_COMPLETE TJEntryPoint.ENTRY_POINT_INBOX TJEntryPoint.ENTRY_POINT_INIT TJEntryPoint.ENTRY_POINT_STORE
Currency
- Get/spend/earn will no longer accept negative values.
- If self-managed currencies call the managed currency API's, an error will be returned.
You can also set the amount of currency a user needs to achieve their goal on each placement.TJPlacement placement = Tapjoy.getPlacement("placement", this); placement.setCurrencyBalance("1234", 100, new TJSetCurrencyBalanceListener() { @Override public void onSetCurrencyBalanceSuccess() { } @Override public void onSetCurrencyBalanceFailure(int code, String error) { } });
TJPlacement placement = Tapjoy.getPlacement("placement", this); placement.setCurrencyAmountRequired("1234", 100, new TJSetCurrencyAmountRequiredListener() { @Override public void onSetCurrencyAmountRequiredSuccess() { } @Override public void onSetCurrencyAmountRequiredFailure(int code, String error) { } });
12.8.0
Tapjoy now hosts our own maven repository. Bintray will continue to work in the short term, but as it is deprecated we recommend updating to use our repository as soon as you can. All previous and new releases are available by using our repository while only releases pre-12.8.0 will be available going forward on Bintray. You can use the new repository like so:repositories { maven { name "Tapjoy's maven repo" url "https://sdk.tapjoy.com/" } } dependencies { api 'com.tapjoy:tapjoy-android-sdk:12.8.0@aar' }