>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The Battery Info module provides APIs for querying the charger type, battery health status, and battery charging status.
...
...
@@ -8,7 +8,7 @@ The Battery Info module provides APIs for querying the charger type, battery hea
## Modules to Import<a name="section199443271307"></a>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```
```js
importscreenlockfrom'@ohos.screenLock';
```
...
...
@@ -28,7 +28,7 @@ Checks whether the screen is locked. This method uses an asynchronous callback t
> - The APIs of this module are no longer maintained since API version 7. It is recommended that you use [`@ohos.batteryInfo`](js-apis-battery-info.md) instead.
>
> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...
...
@@ -9,7 +9,7 @@
## Modules to Import
```
```js
importbatteryfrom'@system.battery';
```
...
...
@@ -39,7 +39,7 @@ The following value will be returned when the check result is obtained.
> - The APIs of this module are no longer maintained since API version 7. It is recommended that you use [`@ohos.brightness`](js-apis-brightness.md) instead.
>
> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...
...
@@ -9,7 +9,7 @@
## Modules to Import
```
```js
importbrightnessfrom'@system.brightness';
```
...
...
@@ -38,7 +38,7 @@ The following values will be returned when the operation is successful.
**Example**
```
```js
exportdefault{
getValue(){
brightness.getValue({
...
...
@@ -73,7 +73,7 @@ Sets the screen brightness.
**Example**
```
```js
exportdefault{
setValue(){
brightness.setValue({
...
...
@@ -114,7 +114,7 @@ The following values will be returned when the operation is successful.
**Example**
```
```js
exportdefault{
getMode(){
brightness.getMode({
...
...
@@ -149,7 +149,7 @@ Sets the screen brightness adjustment mode.
**Example**
```
```js
exportdefault{
setMode(){
brightness.setMode({
...
...
@@ -185,7 +185,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**.