tuya Smart Life App SDK Upgrading Instructions

August 6, 2024
Tuya

tuya Smart Life App SDK Upgrading

tuya-Smart-Life-App-SDK-Upgrading-PRODUCT

Product Information

Specifications:

  • Product Name: Tuya Smart Life App SDK
  • Version: 20240613
  • Online Version

Product Usage Instructions

Applicability

The Tuya Smart Life App SDK upgrade guide helps in updating your SDK from a legacy version to v5.x.x using an automatic upgrade script.

Upgrade Procedure:

  1. Copy and paste the files thingMapping.json and thingMapping.gradle to the app module directory.
  2. In the app > build.gradle file, reference the script thingMapping.gradle using the following code: apply plugin: ‘com.android.application’ // References the script plug-in. apply from: thingMapping.gradle
  3. Open the thingMapping.gradle file, find replaceThing and click the green triangle to start automatic modifications.
  4. Visit Tuya Developer Platform > App SDK > SDK Development > Details page of your SDK-based app > Get SDK to obtain the latest key information such as AppKey and AppSecret.
  5. Replace the key information in your project with the new ones.For detailed instructions, refer to ‘Configure AppKey, AppSecret, and certificate signature’.

Things to Note:
Ensure to carefully follow the upgrade procedure steps and replace the key information accurately to avoid any issues with your SDK-based app.

FAQ

Q: What should I do if I encounter errors during the upgrade process?
A: If you face any errors during the upgrade process, refer to the troubleshooting section in the upgrade guide or contact Tuya support for assistance.

Tuya upgrades Smart Life App SDK and makes the latest version generally available. Based on the optimized business architecture, you can benefit from the neutral software development service and take your unique and proprietary application business to the next level. This topic describes how to upgrade your SDK from a legacy version to v5.x.x by using the automatic upgrade script.

Applicability

  • If this is the first time you integrate with Smart Life App SDK, the SDK version is v5.x.x. In this case, you can ignore the steps in this topic.
  • If you have already integrated Smart Life App SDK into your app, the following legacy versions can be upgraded to v5.x.x:
    • Smart Life App SDK v3.x.x and v4.x.x
    • UI BizBundle SDK v3.x.x and v4.x.x

Procedure

  1. Copy and paste the mapping table thingMapping.json and script thingMapping.gradle to the app module directory.
  2. Choose app > build.gradle and reference the script thingMapping.gradle.tuya-Smart-Life-App-SDK-Upgrading-2
  3. Open the file thingMapping.gradle, find replaceThing, and then click the green triangle to start automatic modifications.tuya-Smart-Life-App-SDK-Upgrading-1
  4. Go to Tuya Developer Platform > App SDK > SDK Development > Details page of your SDK-based app > Get SDK, and get the latest key information, including AppKey and AppSecret.tuya-Smart-Life-App-SDK-Upgrading-PRODUCT
  5. Replace the key information in your project with the new one. For more information, see Configure AppKey, AppSecret, and certificate signature.

Things to note

  • If you have called non-open SDK methods by using reflection, you need to manually finish the required modifications.
  • If you have called non-API entity classes or methods, you also need to manually finish the required modifications. Alternatively, you can put the name of this type of class or method in the mapping table thingMapping.json and rerun the script to implement automatic modifications.

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals