All Products
Search
Document Center

How to get UC SDK key

Last Updated: Mar 11, 2021

Background

When the mPaaS Android project accesses the H5 container component, the developer needs to configure UCSDKAppKey in AndroidManifest.xml to enable the H5 container component which is based on the UC core.

UC SDK App Key is provided by Alibaba Cloud and developers need to submit a ticket through the ticket system to apply for a key. The application requires the developer to provide the application ID and the SHA1 fingerprint of the signed certificate of the application.

Procedures

Steps to obtain UC SDK App Key:

  1. Prepare the required information
  2. Submit a ticket
  3. Use and verification

Prepare the required information

  1. Get the Application ID of the Android application (Click here to see the definition of the Application ID).
  2. Obtain the SHA1 fingerprint of the signed certificate.
    • Prepare the Keystore or JKS file for Android application signature.
    • Using the keytool tool that comes with the JDK, run the following command to obtain:
      1. keytool -list -v -keystore <example.keystore>
      • SHA1 fingerprint of the signed certificate from the output, for example:
         SHA1

Submit a ticket

  1. Log on to Ticket system .
  2. Choose the product mPaaS Mobile Development Platform.
  3. Enter the required information according to the notice:
    • In Priority, select Important or Ordinary according to your actual situation.
    • In Question Description, enter Request UC SDK App Key, and the Application ID & SHA1 fingerprint of the signed certificate obtained in the previous step.
  4. Technical staff will manually review the request upon receipt. After the review is approved, UC SDK App Key will be provided through the ticket system.

Use and verification

Use in your project

  1. In the target mPaaS Android project, find AndroidManifest.xml, edit the UCSDKAppKey value and enter the SDK Key obtained in the previous step.

    1. <meta-data android:name="UCSDKAppKey" android:value="Obtained key"/>

     AndroidManifest

    Note: UC SDK App Key corresponds to the Application ID and the SHA1 fingerprint of the singed certificate of the application. Different apps need to apply for different keys. Mixed use is not allowed, otherwise the UC core will not be enabled.
  2. In the project, open any page by code using the H5 container. For more details, see Using an SDK. Then recompile and repackage.

Verification

Run the test project and search for create uc web view in the Logcat logs.

  • If the log shows [main] create uc web view, the UC core is successfully enabled, for example:
    success
  • If the log shows [main] create uc web view exception, the UC core fails to be enabled, for example:
    Fail