English | 中文
Digital Copyright Identifier Kit (DCI Kit), developed by Huawei and Copyright Protection Center of China (CPCC), protects copyright on digital works by leveraging technologies related to the blockchain, big data, and AI, in compliance with the Copyright Law of People's Republic of China and DCI specifications and regulations. Capabilities provided by this kit include DCI user registration, copyright registration, and copyright safeguarding. Information about successfully registered works (including their DCI codes) will be stored in the blockchain, ensuring that all copyright information is reliable and traceable.
The sample code, which is complied using Gradle, shows how to integrate the DCI SDK for Android into an app.
Install Android Studio on your computer. Open the demo project in Android Studio. You can find build.gradle files in the project.
Register as a Huawei developer on HUAWEI Developers. Create an app and configure app information in AppGallery Connect. For details, please refer to Preparations. Integrate HUAWEI Account Kit. If you want copyright owners to be notified when a DCI code is issued, also integrate Push Kit.
Configure the sample code.
(1) Download the agconnect-services.json file from AppGallery Connect and add it to the app directory of the demo project.
(2) Open the app-level build.gradle file. Replace APP_ID with the app ID obtained from AppGallery Connect and applicationId with your app package name.
(3) Generate a signing certificate fingerprint. Copy the generated signing certificate to the project and configure the signing certificate in the app-level build.gradle file.
The sample code shows how to use capabilities of DCI Kit, including registration and deregistration of DCI users, obtaining information about a DCI user, registration and deregistration of photographic work copyrights, obtaining work copyright registration information, and adding a DCI icon to registered photographic works.
Information about the registered DCI users and works is printed in the log. In addition, the user deregistration or work copyright deregistration result will be displayed in a toast window.
You can visit the Reddit community to obtain the latest information about HMS Core and communicate with other developers.
If you have any questions about the sample code, try the following:
huawei-mobile-servicestag. Huawei experts will help you.
The sample code is licensed under Apache 2.0.