as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

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.

Copied to clipboard.

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);

Copied to clipboard.

HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.epgSyncTask::doTask",
    () => doEpgSyncTask);

Last updated: Jan 20, 2026