提交 9f4937bf 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 7aee7edb
# @ohos.application.DataShareExtensionAbility
# @ohos.application.DataShareExtensionAbility (DataShare Extension Ability)
The **DataShareExtensionAbility** module provides data share services based on the Extension ability.
......@@ -22,12 +22,11 @@ import DataShareExtensionAbility from '@ohos.application.DataShareExtensionAbili
The URIs are in the following format:
**Scheme://authority/path**
- *Scheme*: scheme name, which has a fixed value of **datashare** for the **DataShare** module.
- *authority*: [userinfo@]host[:port]
- *userinfo*: login information, which can be left unspecified.
- *host*: server address. It is the target device ID for cross-device access and empty for local device access.
- *port*: port number of the server, which can be left unspecified.
- *userinfo*: login information, which can be left unspecified.
- *host*: server address. It is the target device ID for cross-device access and empty for local device access.
- *port*: port number of the server, which can be left unspecified.
- *path*: **DataShare** identifier and the resource path. The **DataShare** identifier is mandatory, and the resource path is optional.
Example:
......@@ -42,7 +41,7 @@ Example:
**System capability**: SystemCapability.DistributedDataManager.DataShare.Provider
| Name| Type| Readable| Writable| Description|
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| context | [ExtensionContext](js-apis-inner-application-extensionContext.md) | Yes| No|Context of the DataShare Extension ability.|
......@@ -76,7 +75,8 @@ let rdbStore;
export default class DataShareExtAbility extends DataShareExtensionAbility {
onCreate(want, callback) {
rdb.getRdbStore(this.context, {
name: DB_NAME
name: DB_NAME,
securityLevel: rdb.SecurityLevel.S1
}, function (err, data) {
console.log('getRdbStore done, data : ' + data);
rdbStore = data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册