• Home
Name Date Size #Lines LOC

..--

AppScope/12-May-2024-3633

entry/12-May-2024-2,3422,166

screenshots/devices/12-May-2024-

.gitignoreD12-May-2024143 1211

README.mdD12-May-20241.5 KiB3518

README_zh.mdD12-May-20242.3 KiB4725

build-profile.json5D12-May-20241 KiB4241

hvigorfile.tsD12-May-2024158 21

package.jsonD12-May-2024372 1818

README.md

1# Flip Clock
2
3### Introduction
4
5 This sample uses the Feature Ability (FA) model and related APIs to implement a simple flip clock app. Below shows the sample app.
6
7![FlipClock](screenshots/devices/FlipClock.png)  ![CountDown](screenshots/devices/CountDown.png)
8
9### Concepts
10
11**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.
12
13### Required Permissions
14
15ohos.permission.PUBLISH_AGENT_REMINDER (permission for the reminder agent)
16
17ohos.permission.RUNNING_LOCK (permission for the running lock)
18
19ohos.permission.NOTIFICATION_CONTROLLER (permission for send notification)
20
21### Usage
22
231. 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.
24
252. On the **Alarm** tab page, you can touch **+** to create an alarm record. When the alarm time arrives, a notification will be displayed.
26
273. The **Countdown** tab page provides the countdown function.
28
294. The **Settings** tab page provides the following functions: full screen, screen brightness adjustment, and screen-on.
30
31### Constraints
32
331. This sample can only be run on standard-system devices.
34
352. This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100, built on November 3, 2022) to compile and run.

README_zh.md

1# 翻页时钟
2
3### 介绍
4
5本示例集中展示了时钟、闹钟相关的场景,使用@ohos.reminderAgenManager完成闹钟的相关功能,使用animateTo完成翻页时钟动画,使用@ohos.runningLock完成屏幕常亮功能
67
8使用说明
9
101.主页面有四个底部标签栏,时钟页面展示了数字翻页时钟功能。
11
122.闹钟功能点击**+**号可以创建一个闹钟,等闹钟时间到了会进行提醒。
13
143.倒计时功能。
15
164.设置里边实现的功能有全屏、调节屏幕亮度和不熄屏。
17
18### 效果预览
19
20|首页|闹钟|倒计时|设置|
21|----------------|----------------------|----------------------|----------------------|
22|![FlipClock](screenshots/devices/FlipClock.png) |![FlipClock](screenshots/devices/AlarmClock.png) | ![CountDown](screenshots/devices/CountDown.png)|![CountDown](screenshots/devices/Setting.png)|
23
24### 相关概念
25
26后台代理提醒:后台代理提醒主要提供后台提醒发布接口,开发者在应用开发时,可以调用这些接口去创建定时提醒,包括倒计时、日历、闹钟三种提醒类型。使用后台代理提醒能力后,应用可以被冻结或退出,计时和弹出提醒的功能将被后台系统服务代理。
27
28### 相关权限
29
30[ohos.permission.PUBLISH_AGENT_REMINDER](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md#ohospermissionpublish_agent_reminder)
31
32[ohos.permission.RUNNING_LOCK](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md#ohospermissionrunning_lock)
33
34[ohos.permission.NOTIFICATION_CONTROLLER](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md#ohospermissionnotification_controller)
35
36### 依赖
37
38不涉及。
39
40### 约束与限制
41
421.本示例仅支持在标准系统上运行。
43
442.本示例需要使用DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100, built on November 3, 2022)才可编译运行。
45
463.本示例需要使用@ohos.brightness和@ohos.notificationManager系统权限的系统接口。使用Full SDK时需要手动从镜像站点获取,并在DevEco Studio中替换,具体操作可参考[替换指南](https://docs.openharmony.cn/pages/v3.2/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md/)47