How to use the expo-task-manager.getRegisteredTasksAsync function in expo-task-manager

To help you get started, we’ve selected a few expo-task-manager examples, based on popular ways it is used in public projects.

github expo / expo / home / screens / GeofencingScreen.js View on Github external
async function getSavedRegions() {
  const tasks = await TaskManager.getRegisteredTasksAsync();
  const task = tasks.find(({ taskName }) => taskName === GEOFENCING_TASK);
  return task ? task.options.regions : [];
}
github expo / expo / apps / native-component-list / src / screens / Location / GeofencingScreen.tsx View on Github external
async function getSavedRegions(): Promise<GeofencingRegion[]> {
  const tasks = await TaskManager.getRegisteredTasksAsync();
  const task = tasks.find(({ taskName }) => taskName === GEOFENCING_TASK);
  return task ? task.options.regions : [];
}

expo-task-manager

Expo module that provides support for tasks that can run in the background.

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis

Similar packages