Last Updated on : 2024-11-18 11:33:16download
Group Management UI BizBundle provides the service logic and UI encapsulation for device groups. This allows users to create and modify device groups.
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:
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.
Add the following dependency to the file build.gradle
of·module
:
dependencies {
implementation 'com.tuya.smart:tuyasmart-bizbundle-groupmanager:4.2.0-33'
}
API description
GroupState TuyaGroupManager.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. |
API description
GroupState TuyaGroupManager.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. |
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.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback