feat: 更新健康数据权限描述,添加HRV数据获取测试功能,优化后台任务配置,调整压力计显示单位
This commit is contained in:
@@ -3,6 +3,7 @@ import { StandReminderHelpers, WaterNotificationHelpers } from '@/utils/notifica
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import * as BackgroundTask from 'expo-background-task';
|
||||
import * as TaskManager from 'expo-task-manager';
|
||||
import { TaskManagerTaskBody } from 'expo-task-manager';
|
||||
|
||||
/**
|
||||
* 后台任务标识符
|
||||
@@ -14,7 +15,7 @@ export const BACKGROUND_TASK_IDS = {
|
||||
} as const;
|
||||
|
||||
// 定义后台任务
|
||||
TaskManager.defineTask(BACKGROUND_TASK_IDS.HEALTH_REMINDERS, async () => {
|
||||
TaskManager.defineTask(BACKGROUND_TASK_IDS.HEALTH_REMINDERS, async (body: TaskManagerTaskBody) => {
|
||||
try {
|
||||
console.log('[BackgroundTask] 后台任务执行');
|
||||
await executeBackgroundTasks();
|
||||
|
||||
Reference in New Issue
Block a user