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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

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 {
  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 5 months ago

Package Health Score

89 / 100
Full package analysis