Reading guide
This article brings a very detailed introduction to the whole process of meta service development and listing, including meta service introduction, creation, service card, signature, development and testing, signature packaging, listing review, etc., all of which are readily available.
Introduction to Atomic Services
- Atomic services are a new way of delivering services
- Simple to develop, installation-free, easy to access and use
- Compared with Mini Programs, the system is native, silky and smooth
lightweight application form, with seconds to open and direct, pure and refreshing; The service is accompanied by the right time; Use and go, and the account will follow; One body and two sides, embedded operation; Native intelligence, global search; Efficient development, born trustworthy and other characteristics.
Features
- Instant on: Instant on-the-go, no splash ads
- Service accompaniment: performance reminder, closed-loop service
- Run out and go: There is no pop-up window when you log out, and the service is synchronized with your account
- Native intelligence: Xiaoyi intelligence, accurate reachGlobal Search: The system search box
- Efficient development: UX component sets, scenario-based templates, and more
Create a meta service
Create a project
- Open DevEco 2.New -> Create Project
- Select Atmoic Service
The first time we will be prompted Huawei account, click here to log in, note that the login here is the developer account, that is, the account used for listing, if you are an enterprise, then you should use the company's developer account to log in.
Click Login, you will be redirected to the browser, log in to the developer account on the web page, and authorize it.
The webpage shows that the login is successful, and then we go back to Deveco.
If it is the first time to use the project and the project has not been created, you need to click 'Register App ID' to create a new project
Fill in the meta service name, it should be noted that the name cannot be the same name, it is identifiable, and cannot be a generalized induction class to avoid inducing users.
Click Next, select the project, if you haven't created a project yet, enter the project name, and click Confirm to create
Complete APPID registration.
You need to create a meta service urgently, click Done, and the boilerplate code is generated.
Icon generation
Right-click a module or file in the project
New -> Image Asset
Make a 1024 x 1024 px square icon that automatically generates circles around it
Write a page
@Entry indicates that the custom component is an entry component, which means that it is a page
@Component stands for a custom component
@State represents the state variable in the component, and the change of the state variable triggers a UI refresh
aboutToAppear is the lifecycle, after the component is instantiated, but before build().
build() describes the method for the UI
note: Meta services are exactly the same technology stack as HarmonyOS native applications, but the collection of available APIs is different, and the functions are relatively simple
Considerations for writing metaservices
Quite a few APIs/Kits cannot be used in meta services,
Open API Reference, and you can select this option on the left to filter the set of meta service APIs
Service card
Static card interaction component FormLink
Used for interaction within static cards and between provider apps
action: router is used for redirects, and the UIAbility side receives parameters via params
Receive parameters
! alt text
EntryAbility.ets
onCreate and onNewWant via want?. parameters?. params receive parameters
onCreate: Create a UIAbility instance
onNewWant: The UIAbility instance returns from the background to the foreground and is hot-started
onWindowStageCreate: After UIAbility is created, a WindowStage is created before entering the foreground
Dev Testing
! alt text
- Emulators
- Previewer
- Real machine debugging
- Hot reload
DevEco Testing
Stability testing
Performance power consumption test
Regression testing
Basic quality testing
Device screen mirroring
Support the meta-service of the tablet to ensure that the compatibility test has been carried out, otherwise it will affect the review of the shelf
This part is explained in detail in "HarmonyOS Flutter Practice: 13 - HarmonyOS Application Packaging and Listing Process".
! alt text
- DevEco creates a Key Store
- Generate keys and CSRs
- Add a certificate to Huawei AGC, upload the CSR, and obtain the Cer certificate file
- Create a Profile file
- Configure the signature file
- Packaging (Build/Huild Apps)
! alt text
- Go back to AGC, complete the app information, and upload the icon
- Upload the package
- Fully apply the introduction, fill in the privacy policy and user agreement
- If it is an APP, you need to prepare the filing and soft copyright in advance (it is recommended to use an electronic copyright certificate)
- Submit for review
Top comments (0)