Fading Coder

One Final Commit for the Last Sprint

Building a Distributed Restaurant Ordering App with HarmonyOS

This example demonstrates a multi-user restaurant ordreing application leveraging HarmonyOS’s distributed data capabilities. Users on different devices within the same network can collaboratively view and update an order in real time without requiring QR codes or external services. Project Structure...

Implementing Page Routing and Navigation in HarmonyOS with ArkUI

Navigate to a Details Page Here is a DetailsPage component that displays an image and allows its width to be adjusted. The page provides a way to navigate back to the home screen. import { router } from '@ohos.router'; @Entry @Component struct DetailsPage { @State currentImageWidth: number = 150; bu...

Implementing Asynchronous Tasks with Node-API Using napi_create_async_work

The Node-API functon napi_create_async_work facilitates the execution of tasks in background threads, allowing long-running operations to avoid blocking the main thread. This approach involves defining two callback functions: one for background execution and another for completion handling on the ma...

Applying Declarative UI Concepts in ArkUI for HarmonyOS Development

In ArkUI's declarative paradigm, UIs are constructed by composing reusable components with clearly defined state and appearance. Below is an illustration using a minimal custom component. @Entry @Component struct MainView { @State labelTxt: string = "Initial Text" build() { Row() { Column(...

Handling Compound Gestures in ArkUI for HarmonyOS

1. Sequantial Recognition Sequential cmopound gestures require gestures to trigger in a specific order; subsequent gestures activate only after the previous one completes successfully. // xxx.ets @Entry @Component struct MyGestureDemo { @State moveX: number = 0; @State moveY: number = 0; @State pres...

Getting Started with ArkTS for HarmonyOS Development

ArkTS is the primary development language for HarmonyOS. Its syntax is highly similar to TypeScript, making it easy for front-end developers to adapt to with a low learning curve. Even if you have no prior TypeScript experience, you can start building HarmonyOS applications quickly by learning core...

Integrating Gallery Image Selection into Product Review Interfaces with HarmonyOS ArkUI

Developing a product review interface that supports media attachments requires seamless integration between UI components and the system media framework. In HarmonyOS, this is achieved by combining Grid and TextArea components within a scrollable layout, coupled with the @ohos.file.media module for...

Implementing Non-Anonymous Key Attestation with HarmonyOS Universal Keystore Kit

Prerequisites Before using this functionality, you must request the ohos.permission.ATTEST_KEY permission. Developers should refer to the officail permission application procedures based on their application's APL level. Linking Dynamic Libraries in CMake target_link_libraries(your_target_name PUBLI...

Implementing HTTP Data Requests with Axios in HarmonyOS

Configuring Network Permissions in module.json5 To enable network access for your HarmonyOS application, you must declare the internet permission in your module.json5 file. "requestPermissions": [{ "name": "ohos.permission.INTERNET" }] Installing the Axios Library Insta...