What is UI BizBundle SDK for Android?

Last Updated on : 2022-02-17 07:12:15download

Tuya UI BizBundle for Android is a vertical service bundle that encompasses logic modules and UI pages. It enables efficient access to comprehensive service modules provided by Tuya and accelerates your development based on Tuya Smart Residence App SDK.

Overview

A bunch of BizBundles are supported, including:

  • Device Pairing UI BizBundle
  • Device Control UI BizBundle
  • Device Details UI BizBundle
  • Group Management UI BizBundle

Example

For more information about the example of the UI BizBundle for Android, visit tuya-ui-bizbundle-android-demo on GitHub.

Architecture

Tuya UI BizBundles for Android can be integrated as services. All features are provided based on services.

What is UI BizBundle SDK for Android?

Get services

A BizBundle provides BizCore with a service protocol. Thus, you can call a specific service method to implement the service.

The BizBundle implements the service protocol.
Get the instance to implement the service protocol.
Protocol
+doSomeThing()
BizBundle
BizCore
+findServiceByInterface() : id<Service>
YourClass
+id<Service> serviceImpl

Implement services

Certain service protocols of BizBundles are not implemented by default. For example, the Device Details UI BizBundle depends on the device pairing service in specific conditions. If the Device Pairing UI BizBundle is not integrated, this service protocol is not implemented. In this case, you can create a class to implement the required service protocol and register it to BizCore to improve the features of the BizBundle.

Implement the service protocol.
Register your service implementation class or instance.
Service
+doSomeThing()
YourClass
+doSomeThing()
BizCore
+registerService(Protocol, Class)
BizBundle