146 Star 1.4K Fork 1.7K

OpenHarmony/applications_app_samples

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Account
AppSample
Basic
Communication
CompleteApps
FlipClock
entry
screenshots/devices
README.md
README_zh.md
build-profile.json5
hvigorfile.js
package.json
KikaInput
DFX
ETSUI
EngineeringCapability/Npm
FileManager/FileIo
Graphics
MultiDeviceAppDev
Native/NativeAPI
Network
Notification
PackageManagement/ZipLib
Preset
ResourcesSchedule
Safety
Telephony
UI
Util
ability
common
data
device
media
thread/JsWorker
.gitattributes
.gitignore
CodeCommitChecklist.md
LICENSE
OAT.xml
README.md
README_zh.md
changelog.md
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

Flip Clock

Introduction

This sample uses the Feature Ability (FA) model and related APIs to implement a simple flip clock app. Below shows the sample app.

FlipClock CountDown

Concepts

reminderAgent: a class that provides APIs to create scheduled reminders for countdown timers, calendar events, and alarm clocks. When the created reminders are published, the timing and pop-up notification functions of your application will be taken over by the reminder agent in the background when your application is frozen or exits.

Required Permissions

ohos.permission.PUBLISH_AGENT_REMINDER (permission for the reminder agent)

ohos.permission.RUNNING_LOCK (permission for the running lock)

Usage

  1. There are four tab bars (Clock, Alarm, Countdown, and Settings) at the bottom of the home page of the sample app. The Clock tab page displays a flip clock.

  2. On the Alarm tab page, you can touch + to create an alarm record. When the alarm time arrives, a notification will be displayed.

  3. The Countdown tab page provides the countdown function.

  4. The Settings tab page provides the following functions: full screen, screen brightness adjustment, and screen-on.

Constraints

  1. This sample can only be run on standard-system devices.

  2. DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022) must be used.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/applications_app_samples.git
git@gitee.com:openharmony/applications_app_samples.git
openharmony
applications_app_samples
applications_app_samples
samples_monthly_0830

Search