我在 RN android 中使用无头任务,但我不明白一件事,超时,这是否意味着我希望后台进程工作多长时间?我想一直工作到调用 stopService,所以我必须在那里指定超时吗?
return new HeadlessJsTaskConfig("headless_task", data, 5000, // timeout for the task
true // optional: defines whether or not the task is allowed in foreground. Default
// is false
);