Skip to main content
Version: v3

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:

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 download TapSDK-UnityPackage.zip.
  • Go to your Unity project, navigate to Assets > Import Package > Custom Package, select the TapTap_Common and TapTap_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.

Set Up Authorization Callback

// 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();
}

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.

TapLicense.Check();
TapLicense.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

  1. Change gradle build tools to 4.1.0+:

    classpath 'com.android.tools.build:gradle:4.1.0'
  2. 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.