Copyright Verification
If you ever thought about selling your game online, you probably have worried if the players could bypass the legitimate process of paying for your game and download copies of your game from unauthorized sources like piracy websites. Luckily, TapTap offers an easy-to-use Copyright Verification SDK that lets you perform a quick license check when a player opens your game for the first time. If the player opens your game without purchasing it beforehand, the SDK will guide the player to make a purchase. This ensures that a player who didn’t purchase your game won’t be able to enter the game even if they managed to obtain a copy of the game.
Installing SDK
You can download the TapSDK from the Downloads page. Once you have the SDK on your computer, add them to your project:
- Unity
- Android
- iOS
- UE4
You can add the SDK either manually or with the Unity Package Manager.
If you choose to use the Unity Package Manager, you should add the following dependencies into Packages/manifest.json
:
"dependencies":{
"com.taptap.tds.common":"https://github.com/TapTap/TapCommon-Unity.git#3.29.4",
"com.taptap.tds.dlc": "https://github.com/TapTap/TapLicense-Unity.git#3.29.4",
"com.leancloud.storage": "https://github.com/leancloud/csharp-sdk-upm.git#storage-2.3.0",
}
If you choose to manually import the SDK, you should:
- In the download page, click
TapSDK Unity
to downloadTapSDK-UnityPackage.zip
. - Go to your Unity project, navigate to Assets > Import Package > Custom Package, select the
TapTap_Common
andTapTap_License
modules from unzipped SDK. - Download LeanCloud-SDK-Storage-Unity.zip, unzip it as a
Plugins
folder, and drag and drop the folder into Unity.
Put the SDK into project/app/libs
and then add the following lines into project/app/build.gradle
:
repositories{
flatDir {
dirs 'libs'
}
}
dependencies {
implementation name:'TapCommon_3.29.4', ext:'aar'
implementation name:'TapLicense_3.29.4', ext:'aar'
}
// Not supported yet
Copy the TapLicense , TapCommon plugins into the project's plugins directory and add the dependencies to the build.cs file of the project module:
PublicDependencyModuleNames.AddRange(new string[] {
"Json",
"JsonUtilities",
"SlateCore",
"TapCommon",
"TapLicense",
});
Set Up Authorization Callback
- Unity
- Android
- iOS
- UE4
// The `License` library (required)
using TapTap.License;
// By default, the SDK will display a window
// that can’t be closed manually by the player to avoid unauthorized players from entering the game.
// If you want to use a callback to trigger a customized procedure,
// please add the following code.
TapLicense.SetLicencesCallback(ITapLicenseCallback callback);
public interface ITapLicenseCallback
{
// Authorization success callback
void OnLicenseSuccess();
}
// By default, the SDK will display a window
// that can’t be closed manually by the player to avoid unauthorized players from entering the game.
// If you want to use a callback to trigger a customized procedure,
// please add the following code.
TapLicenseHelper.setLicenseCallback(new TapLicenseCallback() {
@Override
public void onLicenseSuccess() {
// Authorization success callback
}
});
// Not supported yet
// The `License` library is required.
#include "TapLicense.h"
// By default, the SDK displays a popup that cannot be manually cancelled by the player to prevent unauthorised players from entering the game; if you need a callback to trigger the process, add the following code
FTapLicense::SetLicenseCallback(FSimpleDelegate::CreateLambda([]() {
// Authorisation successful
}));
Payment and Authorization Verification
The default value of the parameter in the Check method is false, which means that the SDK will confirm whether or not the currently logged in user has purchased the game via the TapTap client the first time and again after the 5th day from the first trigger. If you use the value of true, then every time the interface is called it will confirm whether or not the currently logged in user has purchased the game via the TapTap client.
- Unity
- Android
- iOS
- UE4
TapLicense.Check();
TapLicense.Check(true)
TapLicenseHelper.check(Activity activity);
TapLicenseHelper.check(Activity activity, boolean forceCheck);
// Not supported yet
FTapLicense::Check();
FTapLicense::Check(true);
Compatibility with Android 11 and later versions
Android 11 (API level 30) has ramped up its privacy protection policies resulting in a series of changes and restrictions, one of the key changes being Package Visibility, which prevents third-party apps from launching the TapTap app. This has affected related TapTap services from functioning properly, including but not limited to accessing TapTap for updates and purchase verification.
Solution 1
Compile the game with targetSdkVersion
set to 29 (setting this to 30 or above will lead to the problem).
Solution 2
Change gradle build tools to 4.1.0+:
classpath 'com.android.tools.build:gradle:4.1.0'
Add the following lines to AndroidManifest.xml:
<queries>
<package android:name="com.taptap" />
<package android:name="com.taptap.pad" />
<package android:name="com.taptap.global" />
</queries>
Testing
To ensure that the game can determine whether a player has a valid purchase after it has been released, please follow the instructions below to complete a self-testing.
1. Upload the APK
Open your game in the Developer Center and go to Game Services > Gaming Ecosystem > Copyright Verification > Package Name.
Here you can upload the APK to be tested. Once you upload the APK, please wait for the review process to be completed.
2. Add Test Accounts
Go to Developer Center > Game Services > Gaming Ecosystem > Copyright Verification > Game Configuration > Manage testers and enter the test accounts’ TapTap IDs.
3. Price Settings
You can set a price for your game by going to Developer Center > Store > Price Settings. For testing purposes, you can set the price to $1.00 USD. Once you set the price, please wait for the review process to be completed.
4. Begin the Test
Now you can open the TapTap app on your device and log in with a test account. Start the testing process from the store page of the app.
You can make a purchase of the game with the test account and then download and enter the game.
If you install the game with the APK without having the test account purchase the game first, there will be a pop-up when you open the game. The pop-up will say that the game is not activated and you should purchase the game from TapTap.
Start Selling Your Game
Once you finish the testing process, you’ll be ready to sell your game.
1. Complete Information
Go to the Developer Center, fill in the information, and submit your game for review.
2. Set Up Pricing
Go to Developer Center > Store > Price Settings, make your game a paid game, set a price for your game, and submit the information for review. Don’t forget to update the TapTap operation staff on your progress.
3. Official Release
After completing the steps above, your game will be ready for the official release.