When the mPaaS Android project accesses the H5 container component, the developer needs to configure
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.
Steps to obtain UC SDK App Key:
- Get the Application ID of the Android application (Click here to see the definition of the Application ID).
- 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:
keytool -list -v -keystore <example.keystore>
- SHA1 fingerprint of the signed certificate from the output, for example:
- Log on to Ticket system.
- Choose the product mPaaS Mobile Development Platform.
- 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.
- 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.
In the target mPaaS Android project, find
AndroidManifest.xml, edit the
UCSDKAppKeyvalue and enter the SDK Key obtained in the previous step.
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.
<meta-data android:name="UCSDKAppKey" android:value="Obtained key"/>
In the project, open any page by code using the H5 container. For more details, see Using an SDK. Then recompile and repackage.
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:
- If the log shows
[main] create uc web view exception, the UC core fails to be enabled, for example: