Include the Package Dependencies
Step 8: Register your Task with the System
Tell the system about your task’s entry points so they are executed. Create or update a task.js file in the same path where the package.json is located 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: Sep 30, 2025

