Fading Coder

One Final Commit for the Last Sprint

Implementing Core Browser Features in HarmonyOS using Web Components

This demonstration illustrates how to construct a basic browser application within HarmonyOS. It utilizes the @ohos.systemparameter interface alongside the native Web component to enable core functionalities such as rendering web content and managing the navigation history stack. Application Usage E...

Implementing Basic Game Controls in HarmonyOS

This example demonstrates how to implement basic game controls using H5, leveraging the button component in ArkUI to showcase the ability to inject and execute JavaScript in a WebView, as well as communication between native applications and H5 pages. The H5 game page used in this example is provid...

Getting Started with ArkTS: Project Layout and First Steps

Project anatomy A ArkTS application is organized as a multi-level tree of configuration and source files: AppScope/app.json5 – global settings for the whole application. entry/ – the primary module; when built it becomes an installable HAP package. entry/src/main/ets/ – ArkTS source code. entry/src/...

HarmonyOS ArkTS Concurrency: Actors, TaskPools, and Worker Threads

Actor Model Overview ArkTS utilizes the Acter model for concurrent execution. In this architecture, computation is divided into independent actors. Each actor encapsulates its own state and behavior, communicating exclusively through asynchronous message passing. This isolation eliminates shared mem...

HarmonyOS Development Notes

Day One Initialize a new NPM project (follow the prompts): npm init Install TypeScript, TSLint, and Node.js type definitions: npm install -s typescript tslint @types/node Create a file named tsconfig.json in the root directory and add the following configuraton: { "compilerOptions": { &quo...

Using GPIO and PWM Interfaces in Harmony OS for Peripheral Control

Using the GPIO Interface to Register Interrupt Handlers for USER Button Response (Input) Set the internal pull-up/down state with IoSetPull (if no external pull-up resistor is present, it must be enabled to reliably detect falling edges). Register the interrupt handler using GpioRegisterIsrFunc. Ref...

Button Component in HarmonyOS ArkUI: Complete Usage Guide

Overview The Button component serves as a fundamental interactive element in HarmonyOS applications, enabling users to trigger actions and submit data. This guide covers the essential features and implementation patterns for working with Button components in ArkUI. Core Functions The Button componen...

Navigation-Based Routing Management in HarmonyOS

Navigation Overview Introduction to Navigation Navigation serves as the root view container for routing navigation and typically acts as the root container for page components (@Entry). It supports three display modes: stack, split, and auto. The Navigation component handles intra-module and cross-m...

Implementing Responsive Layouts in ArkUI with Grid, Flex, and Media Queries

ArkUI provides several methods for building responsive user interfaces. This guide demonstrates three primary approaches using the classic "Hello World" example as a base. Using Grid and GridItem Components The Grid and GridItem components offer a straightforward way to create responsive g...

Implementing a Short Video Application with HarmonyOS

HTTP Data Requests Encapsulate the @ohos.net.http module to manage network requests efficiently. import http from '@ohos.net.http'; interface NetworkOptions { endpoint?: string; httpMethod?: HttpMethod; queryParameters?: Record<string, string>; payload?: string | Object | ArrayBuffer; headers?...