Data management
Local data Management
HarmonyOS allows developers to store and access structured data on a single device. It uses the SQLite engine and provides multiple types of local databases.
Distributed data service
The distributed database in HarmonyOS synchronizes data across devices. By invoking the data management API, an application can store data to a distributed database.
Distributed File Service
HarmonyOS allows file sharing across multiple devices. Applications can access the same files across devices through paths in the file metadata.
Information Search Service
- Full-text index management
- Create indexes
- Data search
Data Storage Management
- System Storage Path
- Storage Device List
- Storage Device Properties
Rights management
License notice
The application and the third-party libraries you are using need to declare the required permissions in the config.json configuration file.
Dynamic request sensitive permissions
Sensitive permissions must be requested dynamically with user confirmation.
Custom permissions
Applications can define new permissions using the “defPerences” : [] property in the config. json configuration file, and use the availability range and grantmode properties to determine the availability and grantmode of application permissions.
Permission Protection methods
- Protection ability: in
config. json
One of the capabilities in' '* permission' : [' permission * 'name']
Property to protect that ability. Applications without specified permissions cannot access this capability.
You can use this method to refuse to open the application if certain permissions are not granted.
- Protection API: Use authentication permissions if the application provides multiple types of data or capabilities with different ranges of availability or levels of protection
**(String permissionName, int pid, int uid
Authenticates the API caller with the specified UID identifier.
HarmonyOS allows you to manage different scopes at different levels.
Permission Request Principle
- Minimum permission.
- Complete permissions.
- User confirmation.
- Options for nearby users.
- No diffusion.
- Avoid duplicate names of custom permissions.
These are the two important dimensions of application management. See our website for more details.