Include the Package Dependencies
Step 8: Register your Task with the System
Tell the system to execute your task's entry points. Create or update a task.js file in the package.json path location with the following content.
import { HeadlessEntryPointRegistry } from "@amazon-devices/headless-task-manager";
import { default as doOnInstallOrUpdateTask } from "./src/OnInstallOrUpdateTask"
import { default as doEpgSyncTask } from "./src/EpgSyncTask"
// Register your EPG Sync function by setting the value of 'doTask'
HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.epgSyncTask::doTask",
() => doEpgSyncTask);
// If you created a new task in Step 6, register it here as well
HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.onInstallOrUpdateTask::doTask",
() => doOnInstallOrUpdateTask);
epgSyncTask, and function name, such as doEpgSyncTask, based on your app's design. But it is essential to adhere to the pattern and use doTask as generated by the React Native for Vega template. The componentID + ::doTask is the task key and must be used as is.
HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.epgSyncTask::doTask",
() => doEpgSyncTask);
- Previous – Step 7: Schedule EPG Task for Entitlements
- Next – Step 9: Enable Channel Tuning and Playback
Last updated: Jan 20, 2026

