diff --git a/en/application-dev/reference/errorcodes/errorcode-datashare.md b/en/application-dev/reference/errorcodes/errorcode-datashare.md index d97e4218f2132e0e9fc211450df1e7faebff0fef..f9c8faebd2ab6f1ca31bc694aadb8c52400631ae 100644 --- a/en/application-dev/reference/errorcodes/errorcode-datashare.md +++ b/en/application-dev/reference/errorcodes/errorcode-datashare.md @@ -8,7 +8,7 @@ **Error Message** -The dataShareHelper is not initialized successfully. +The DataShareHelper is not initialized successfully. **Description** @@ -18,8 +18,12 @@ The **DataShareHelper** class fails to be created. 1. The **uri** specified in **createDataHelper** is incorrect. 2. The **context** specified in **createDataHelper** is incorrect. **DataShare** supports only the stage model. +3. The client application does not have the permission to start **DataShareExtension** from the background when the client attempts to start **DataShareExtension** from the background to create **DataShareHelper**. **Solution** 1. Obtain the correct URI. 2. Check that the context of the stage model is used. +3. Check whether the client has the read or write permission on data. Perform the following steps: + (1) Obtain the data provider bundle name in the path of the URI. For example, the bundle name in uri = "datashare:///com.acts.datasharetest" is **com.acts.datasharetest**. + (2) Obtain the configuration based on the bundle name. For example, run **bm dump --bundle-name com.acts.datasharetest** to obtain the **DataShareExtension** configuration, and check whether the data consumer has **readPermission** or **writePermission**.