* @Author: luozheng 1732036298@qq.com
* @Date: 2024-03-25 17:33:47
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-05 14:55:10
+ * @LastEditTime: 2024-11-18 19:32:15
* @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
* @details:实现查找手表的功能一般需要手表和智能手机之间的配合,通常是通过手机上的应用(App)或其他设备发送指令给手表,触发手表的查找功能。
* 以下是基本的实现步骤:
#include <cmsis_os.h>
#include "vibrator_service.h"
#include "../../../../../../../drivers/peripheral/utils/custom_runtime.h"
+#include <custom_utils.h>
namespace OHOS
{
void FindWatchViewEventListener::PopInterCancelMusic(void)
{
// SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, nullptr, 0);
- ScreenTurnOff();
+ // ScreenTurnOff();
GraphicService::GetInstance()->PostGraphicEvent(
std::bind(&FindWatchViewEventListener::FindWatchRingPlayStop, &FindWatchViewEventListener::GetInstance()));
}
void FindWatchViewEventListener::PopInterPlayMusic(const char *path)
{
path_ = path;
- ScreenTurnOn(-1); // 亮屏操作
+ // ScreenTurnOn(-1); // 亮屏操作
// 将"开启查找手表铃声"任务发布到异步线程
GraphicService::GetInstance()->PostGraphicEvent(
std::bind(&FindWatchViewEventListener::FindWatchRingPlayStart, &FindWatchViewEventListener::GetInstance(), path_));
FindWatchViewEventListener::GetInstance().FindWatch_StartTimer(700);
FindWatchViewEventListener::GetInstance().SetScreenBrightness();
+ ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON);
NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeFindWatchView);
return FindWatchGroupView;
FindWatchViewEventListener::GetInstance().FindWatchRingPlayStop();
FindWatchViewEventListener::GetInstance().ResumeScreenBrightness();
FindWatchViewEventListener::GetInstance().FindWatch_StopTimer();
+ ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON);
}
/* ----------------------- FindWatchRingPlayerListener ---------------------- */