This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo TaskManager
A library that provides support for tasks that can run in the background.
expo-task-manager provides an API that allows you to manage long-running tasks, in particular those tasks that can run while your app is in the background. Some features of this library are used by other libraries under the hood. Here is a list of Expo SDK libraries that use TaskManager.
Libraries using Expo TaskManager
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
You can test
TaskManagerin the Expo Go app. However, check the documentation of each library that usesTaskManagerto confirm whether it supports testing in Expo Go.
Configuration iOS
Standalone apps need some extra configuration: on iOS, each background feature requires a special key in UIBackgroundModes array in your Info.plist file.
Read more about how to configure this in the reference for each of the libraries that use TaskManager.
Usage
Note:
TaskManager.defineTaskmust be called at module scope, not inside a React component. The example above places it at module scope inside the screen file, which works for non-router apps. In Expo Router projects, move it to a separate file (for example tasks.ts) and import that file at the top of your root layout (app/_layout.tsx) so the task is registered before any navigation runs.
API
import * as TaskManager from 'expo-task-manager';
No API data file found, sorry!