Introduction to Network Kit

Note:

Currently in the beta phase.

Network Kit (Network Service) primarily provides the following functionalities:

  • HTTP Data Request: Initiates a data request via HTTP.
  • Network Connection Management: Network Connection Management offers fundamental capabilities for managing networks, including priority management of multiple network connections (WiFi, cellular, Ethernet, etc.), network quality assessment, subscription to default or specified network connection status changes, querying network connection information, DNS resolution, and more.

Constraints and Limitations

When using the network management module's related functionalities, corresponding permissions must be requested.

Before applying for permissions, ensure compliance with the Basic Principles of Permission Usage. Then refer to Access Control - Declaring Permissions to declare the required permissions.

Permission Name Description
ohos.permission.GET_NETWORK_INFO Retrieves network connection information.
ohos.permission.INTERNET Allows the program to open network sockets and establish network connections.