How to use the expo-task-manager.isTaskDefined 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 / packages / expo-background-fetch / src / BackgroundFetch.ts View on Github external
export async function registerTaskAsync(taskName: string, options: BackgroundFetchOptions = {}): Promise<void> {
  if (!ExpoBackgroundFetch.registerTaskAsync) {
    throw new UnavailabilityError('BackgroundFetch', 'registerTaskAsync')
  }
  if (!TaskManager.isTaskDefined(taskName)) {
    throw new Error(
      `Task '${taskName}' is not defined. You must define a task using TaskManager.defineTask before registering.`
    );
  }
  await ExpoBackgroundFetch.registerTaskAsync(taskName, options);
}
github Marwan01 / food-converter / node_modules / expo-background-fetch / build / BackgroundFetch.js View on Github external
export async function registerTaskAsync(taskName, options = {}) {
    if (!ExpoBackgroundFetch.registerTaskAsync) {
        throw new UnavailabilityError('BackgroundFetch', 'registerTaskAsync');
    }
    if (!TaskManager.isTaskDefined(taskName)) {
        throw new Error(`Task '${taskName}' is not defined. You must define a task using TaskManager.defineTask before registering.`);
    }
    await ExpoBackgroundFetch.registerTaskAsync(taskName, options);
}
export async function unregisterTaskAsync(taskName) {
github Marwan01 / food-converter / node_modules / expo-background-fetch / src / BackgroundFetch.ts View on Github external
export async function registerTaskAsync(taskName: string, options: BackgroundFetchOptions = {}): Promise<void> {
  if (!ExpoBackgroundFetch.registerTaskAsync) {
    throw new UnavailabilityError('BackgroundFetch', 'registerTaskAsync')
  }
  if (!TaskManager.isTaskDefined(taskName)) {
    throw new Error(
      `Task '${taskName}' is not defined. You must define a task using TaskManager.defineTask before registering.`
    );
  }
  await ExpoBackgroundFetch.registerTaskAsync(taskName, options);
}
github expo / expo / packages / expo-background-fetch / build / BackgroundFetch.js View on Github external
export async function registerTaskAsync(taskName, options = {}) {
    if (!ExpoBackgroundFetch.registerTaskAsync) {
        throw new UnavailabilityError('BackgroundFetch', 'registerTaskAsync');
    }
    if (!TaskManager.isTaskDefined(taskName)) {
        throw new Error(`Task '${taskName}' is not defined. You must define a task using TaskManager.defineTask before registering.`);
    }
    await ExpoBackgroundFetch.registerTaskAsync(taskName, options);
}
export async function unregisterTaskAsync(taskName) {

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