# OHOS_native_samples **Repository Path**: guitong/OHOS_samples ## Basic Information - **Project Name**: OHOS_native_samples - **Description**: OpenHarmony native samples - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 19 - **Forks**: 5 - **Created**: 2023-09-05 - **Last Updated**: 2026-01-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: HarmonyOS ## README # OHOS_samples ## Introduction This project is primarily a HarmonyOS application module developed based on the Native C++ development scenario. | Module| Explanation | Note | | ----- | ------- | -------- | | Aki | Examples of C++ interaction with TS code, using the @ohos/aki third-party library | | | CPUStatistics| Examples of obtain basic device information: CPU information, memory information, etc. || | File | HarmonyOS file system related operation examples. || | SimpleNapi | C++ interacts with TS and relies on other module and multi-module examples || | VsyncDemo | HarmonyOS Vsync signal example. || | XCompoent | Draw 2D graphics based on XComponent using the egl implementation | XComponent Getting Started Reference | | XCompoent_3D | Draw 3D graphics based on XComponent using the egl implementation | XComponent Getting Started Reference | | XCompoent_Vulkan | Based on XComponent, vulkan is used to achieve graphic drawing | XComponent Getting Started Reference | | Vulkan_subWorker | Based on XComponent, vulkan is used to achieve graph drawing and integrate libuv and worker | | | Worker | Based on XComponent, 2D graphics are drawn using egl solid shapes and integrated libuv and worker | | | DrawingFont | Examples of implement text drawing through Xcomponent+nativeWindow. | | | OpenALApp | An example of the openAL audio library, which uses OHAudio | The project is currently available as a git submodule | | MINIAudioApp | An example of the MINIAudio library, which uses OHAudio | | ## Get repository ### 1. Get all module ```shell git clone git@gitee.com:guitong/OHOS_samples.git ``` ### 2. Get one module from repository The entire project code is quite large, and can be pulled by project. eg:VsyncDemo ```shell git init git config core.sparsecheckout true echo /VsyncDemo > .git/info/sparse-checkout git remote add origin git@gitee.com:guitong/OHOS_samples.git git pull origin master ``` ## Environment Dependencies: * IDE: DevEco Studio 5.0.x.x or above (newer versions of the IDE require automatic migration) * SDK: 5.0.x.x (API 12 or above) * Automatic signing required [DevEco Usage Guide](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ohos-deveco-studio-overview-0000001263280421) ## Running Tutorial 1. For new versions of the IDE, automatic migration is prompted in the right-side warning, click on the Migrate Assistant, select to migrate to 5.0 and then sync again. 2. Automatic signing: Go to File -> Project Structure -> Signing Configs and only check the option for Automatically generate signature. 3. Click on the Run button at the top right of the project. ## Contribution Guide 1. Fork this repository. 2. Create a new branch named Feat_xxx. 3. Commit your code. 4. Create a new Pull Request. ## Reference Documentation 1. OpenHarmony application development API [OpenHarmony / docs](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev)