| context | Context | Yes |Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For the application context of the stage model, see [Context](js-apis-ability-context.md).|
| context | Context | Yes |Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md).|
| bundleName | string | Yes | Bundle name. |
| bundleName | string | Yes | Bundle name. |
## Constants
## Constants
...
@@ -272,7 +272,6 @@ Stage model:
...
@@ -272,7 +272,6 @@ Stage model:
```js
```js
importUIAbilityfrom'@ohos.app.ability.UIAbility'
importUIAbilityfrom'@ohos.app.ability.UIAbility'
letkvManager;
letkvManager;
exportdefaultclassEntryAbilityextendsUIAbility{
exportdefaultclassEntryAbilityextendsUIAbility{
onCreate(){
onCreate(){
...
@@ -358,7 +357,7 @@ try {
...
@@ -358,7 +357,7 @@ try {
console.error(`Fail to get KVStore.code is ${err.code},message is ${err.message}`);
console.error(`Fail to get KVStore.code is ${err.code},message is ${err.message}`);
return;
return;
}
}
console.log("Obtained the KVStore successfully.");
> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.bluetooth`](js-apis-bluetooth.md).
> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.bluetooth`](js-apis-bluetooth.md).
>
>
...
@@ -19,11 +19,10 @@ import bluetooth from '@system.bluetooth';
...
@@ -19,11 +19,10 @@ import bluetooth from '@system.bluetooth';
Scans for Bluetooth Low Energy (BLE) devices nearby. This operation consumes system resources. Call [bluetooth.stopBLEScan](#bluetoothstopblescanobject) to stop the scan after a BLE device is detected and connected.
Scans for Bluetooth Low Energy (BLE) devices nearby. This operation consumes system resources. Call [bluetooth.stopBLEScan](#bluetoothstopblescanobject) to stop the scan after a BLE device is detected and connected.
**Required permissions**: ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION
> 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.
>- The APIs provided by this module are deprecated since API version 9. You are advised to use [cryptoFramework-Cipher](js-apis-cryptoFramework.md#Cipher).
## Modules to Import
## Modules to Import
...
@@ -18,9 +18,10 @@ Defines the response to the cipher interface called.
...
@@ -18,9 +18,10 @@ Defines the response to the cipher interface called.