目录

Atomic Service Introduction

Since HarmonyOS NEXT Developer Preview1 (corresponding to API version 11):

  • Atomic services can only be developed using the atomic service API set based on the stage model in ArkTS. In DevEco Studio, templates for developing atomic services come with the atomic service API set only.
  • The atomic service developed using the matching HarmonyOS SDK runs only on devices whose system software version is HarmonyOS NEXT Developer Preview1 or later.

In the era of Internet of Everything (IoE), the number of devices held per capita keeps increasing, and device types and use scenarios become more diversified, together presenting higher requirements for application development and entries. To fit these changes, both application providers and users are eager for a new way of service provisioning to simplify application development and facilitate acquisition and use of services such as music playback and ride hailing. In addition to traditional applications that need to be installed (applications for short), HarmonyOS also supports installation-free applications, that is, Atomic Services.

The lightweight atomic service offers direct access, shows up when appropriate, allows for both independent and embedded deployments, and features AI intelligence and trustworthiness, all-domain hopping, efficient development, easy-to use, and more.

Atomic services can be independently released, distributed, and executed to implement service closure, greatly improving the efficiency of obtaining information and services.

Atomic Service is developed based on the HarmonyOS SDK (only the Atomic Service API Set can be used) and can run on 1+8+N devices in proper scenarios.

For details about the design principles and specifications, see Atomic Service Design.

The following table compares Atomic Service and applications.

Table 1 Description of Atomic Service and applications

Item

Feature

Carrier

API Scope

Operations

Traditional applications

  • Manual download and installation
  • Free from the bundle size
  • On-demand use
  • In-application update or update from the application market
  • Complete functions, high development costs, long development period

Device

Full APIs

  • Independent operations
  • High cost of finding applications

Atomic Service

  • Installation-free
  • Subject to bundle size limit
  • Tap to use
  • Auto update
  • Lightweight yet complete functions, low development costs

HUAWEI ID

Only Atomic Service API set

  • Assisted operations from Huawei Payment, Petal Maps, and Huawei Ads
  • Service distribution entries such as HUAWEI Assistant·TODAY enable users to find services easily and services to be pushed to specific users.

You can develop either or both of applications and atomic services based on factors such as operation objectives, efficiency, costs, and benefits.

From the perspective of the application entry, the following figure shows the relationships between atomic services, applications, and service widgets. For applications and atomic services, you can select a service widget as the entry.

Figure 1 Relationships between Atomic Service, applications, and service widgets

The following figure shows the basic view of atomic services in development and running states.

Figure 2 Atomic service view

The following sections describe the atomic service development process in detail.