-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
This is my device activity and for some reason, in the event i see intervalDidStart, intervalDidEnd being triggered, but unblockThreshold is not working at all.
Using Expo 53.0.9, development build
await DeviceActivity.startMonitoring(
unlockActivityName,
{
intervalStart: {
hour: now.getHours(),
minute: now.getMinutes(),
second: now.getSeconds(),
},
intervalEnd: {
hour: scheduleEnd.getHours(),
minute: scheduleEnd.getMinutes(),
second: scheduleEnd.getSeconds(),
},
repeats: false,
},
[
{
eventName: "unblockThreshold",
familyActivitySelection: schedule.familyActivitySelection,
threshold: { minute: unlockMinutes },
},
]
);
...
// Re-block after 1 minute and stop the temporary monitor
DeviceActivity.configureActions({
activityName: unlockActivityName,
callbackName: "eventDidReachThreshold",
eventName: "unblockThreshold",
actions: [
{
type: "blockSelection",
familyActivitySelectionId: schedule.selectionId,
},
{
type: "stopMonitoring",
activityNames: [unlockActivityName],
},
],
});
Metadata
Metadata
Assignees
Labels
No labels