Deletes a widget. This API uses a promise to return the result. After this API is called, the application can no longer use the widget, and the Widget Manager will not retain the widget information.
Deletes a widget. This API uses a promise to return the result. After this API is called, the application can no longer use the widget, and the Widget Manager will not retain the widget information.
**System capability**:
SystemCapability.Ability.Form
**Parameters**
**Parameters**
| Name| Type | Mandatory| Description |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------- |
| ------ | ------ | ---- | ------- |
| formId | string | Yes | ID of a widget.|
| formId | string | Yes | ID of a widget.|
**System capability**:
**Return value**
SystemCapability.Ability.Form
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
Instructs the widget framework to make a widget visible. This API uses a promise to return the result. After this API is called, **onVisibilityChange** is invoked to notify the widget provider.
Instructs the widget framework to make a widget visible. This API uses a promise to return the result. After this API is called, **onVisibilityChange** is invoked to notify the widget provider.
**System capability**:
SystemCapability.Ability.Form
**Parameters**
**Parameters**
| Name| Type | Mandatory| Description |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------- |
| ------ | ------ | ---- | ------- |
| formId | string | Yes | ID of a widget.|
| formId | string | Yes | ID of a widget.|
**System capability**:
**Return value**
SystemCapability.Ability.Form
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
Instructs the widget framework to make a widget invisible. This API uses a promise to return the result. After this API is called, **onVisibilityChange** is invoked to notify the widget provider.
Instructs the widget framework to make a widget invisible. This API uses a promise to return the result. After this API is called, **onVisibilityChange** is invoked to notify the widget provider.
**System capability**:
SystemCapability.Ability.Form
**Parameters**
**Parameters**
| Name| Type | Mandatory| Description |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------- |
| ------ | ------ | ---- | ------- |
| formId | string | Yes | ID of a widget.|
| formId | string | Yes | ID of a widget.|
**System capability**:
**Return value**
SystemCapability.Ability.Form
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
Instructs the widget framework to make a widget to be updatable. This API uses a promise to return the result. After this API is called, the widget is in the enabled state and can receive updates from the widget provider.
Instructs the widget framework to make a widget to be updatable. This API uses a promise to return the result. After this API is called, the widget is in the enabled state and can receive updates from the widget provider.
**System capability**:
SystemCapability.Ability.Form
**Parameters**
**Parameters**
| Name| Type | Mandatory| Description |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------- |
| ------ | ------ | ---- | ------- |
| formId | string | Yes | ID of a widget.|
| formId | string | Yes | ID of a widget.|
**System capability**:
**Return value**
SystemCapability.Ability.Form
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
Instructs the widget framework to make a widget not to be updatable. This API uses a promise to return the result. After this API is called, the widget is in the disabled state and cannot receive updates from the widget provider.
Instructs the widget framework to make a widget not to be updatable. This API uses a promise to return the result. After this API is called, the widget is in the disabled state and cannot receive updates from the widget provider.
**System capability**:
SystemCapability.Ability.Form
**Parameters**
**Parameters**
| Name| Type | Mandatory| Description |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------- |
| ------ | ------ | ---- | ------- |
| formId | string | Yes | ID of a widget.|
| formId | string | Yes | ID of a widget.|
**System capability**:
**Return value**
SystemCapability.Ability.Form
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|
**Example**
**Example**
...
@@ -509,6 +556,12 @@ Checks whether the system is ready. This API uses a promise to return the result
...
@@ -509,6 +556,12 @@ Checks whether the system is ready. This API uses a promise to return the result
SystemCapability.Ability.Form
SystemCapability.Ability.Form
**Return value**
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result indicating whether the API is successfully called.|