Group Management UI BizBundle

Last Updated on : 2023-07-03 01:56:30download

Group Management UI BizBundle provides the service logic and UI encapsulation for device groups. This allows users to create and modify device groups.

Functional description

Tuya allows users to create device groups by device type and centralize device control in the same group.

Currently, the following types of devices can be added to device groups:

  • Common Wi-Fi devices
  • Standard Wi-Fi devices

Integrate with the UI BizBundle

Create a project

Integrate Smart Life App SDK for Android into your project with Android Studio, and add the UI BizBundle to your project. For more information, see Integrate with Framework.

Integrate with the UI BizBundle

Add the following dependency to the file build.gradle of·module:

dependencies {
   implementation 'com.thingclips.smart:thingsmart-bizbundle-groupmanager:2.0.0-cube.2'
    }

Implement features

Create a group

API description

GroupState ThingGroupManager.getInstance().createGroup(Activity activity,String devId);

Parameters

Parameter Description
activity The object of Activity.
devId The device ID.

Return values of GroupState

Value Description
SUPPORT Indicates that a group can be created with the device.
NOT_SUPPORT Indicates that a group cannot be created with the device.
NONE Indicates that the specified device does not exist.

Modify a group

API description

GroupState  ThingGroupManager.getInstance().editGroup(Activity activity,long groupId);

Parameters

Parameter Description
activity The object of Activity.
groupId The group ID.

Return values of GroupState

Value Description
SUPPORT Indicates that the group can be modified.
NONE Indicates that the specified group does not exist.

Control a group

Users can open a group panel to control the group. For more information about how to open a group panel, see Open a group panel.