>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 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.
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
...
@@ -8,7 +8,7 @@ The Battery Info module provides APIs for querying the charger type, battery hea
## Modules to Import<a name="section199443271307"></a>
## 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.
> 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
## Modules to Import
```
```js
importscreenlockfrom'@ohos.screenLock';
importscreenlockfrom'@ohos.screenLock';
```
```
...
@@ -28,7 +28,7 @@ Checks whether the screen is locked. This method uses an asynchronous callback t
...
@@ -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 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.
> - 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 @@
...
@@ -9,7 +9,7 @@
## Modules to Import
## Modules to Import
```
```js
importbatteryfrom'@system.battery';
importbatteryfrom'@system.battery';
```
```
...
@@ -39,7 +39,7 @@ The following value will be returned when the check result is obtained.
...
@@ -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 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.
> - 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 @@
...
@@ -9,7 +9,7 @@
## Modules to Import
## Modules to Import
```
```js
importbrightnessfrom'@system.brightness';
importbrightnessfrom'@system.brightness';
```
```
...
@@ -38,7 +38,7 @@ The following values will be returned when the operation is successful.
...
@@ -38,7 +38,7 @@ The following values will be returned when the operation is successful.
**Example**
**Example**
```
```js
exportdefault{
exportdefault{
getValue(){
getValue(){
brightness.getValue({
brightness.getValue({
...
@@ -73,7 +73,7 @@ Sets the screen brightness.
...
@@ -73,7 +73,7 @@ Sets the screen brightness.
**Example**
**Example**
```
```js
exportdefault{
exportdefault{
setValue(){
setValue(){
brightness.setValue({
brightness.setValue({
...
@@ -114,7 +114,7 @@ The following values will be returned when the operation is successful.
...
@@ -114,7 +114,7 @@ The following values will be returned when the operation is successful.
**Example**
**Example**
```
```js
exportdefault{
exportdefault{
getMode(){
getMode(){
brightness.getMode({
brightness.getMode({
...
@@ -149,7 +149,7 @@ Sets the screen brightness adjustment mode.
...
@@ -149,7 +149,7 @@ Sets the screen brightness adjustment mode.
**Example**
**Example**
```
```js
exportdefault{
exportdefault{
setMode(){
setMode(){
brightness.setMode({
brightness.setMode({
...
@@ -185,7 +185,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**.
...
@@ -185,7 +185,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**.