From 6db97d638d5562fa69a44516b75ed80bbef97de9 Mon Sep 17 00:00:00 2001 From: LironErman Date: Fri, 7 Jul 2017 15:15:56 -0700 Subject: [PATCH] Add note to add the service to AndroidManifest Summary: If not you will try to start the service but nothing would happen Closes https://github.com/facebook/react-native/pull/14813 Differential Revision: D5384460 Pulled By: hramos fbshipit-source-id: 6131d7901d3324da97672141c4774b7810051526 --- docs/HeadlessJSAndroid.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/HeadlessJSAndroid.md b/docs/HeadlessJSAndroid.md index 005e43376b7937..763f58c28c8774 100644 --- a/docs/HeadlessJSAndroid.md +++ b/docs/HeadlessJSAndroid.md @@ -52,6 +52,12 @@ public class MyTaskService extends HeadlessJsTaskService { Now, whenever you [start your service][0], e.g. as a periodic task or in response to some system event / broadcast, JS will spin up, run your task, then spin down. +Remember to add the service to your `AndroidManifest` file: + +``` + +``` + ## Caveats * By default, your app will crash if you try to run a task while the app is in the foreground. This is to prevent developers from shooting themselves in the foot by doing a lot of work in a task and slowing the UI. There is a way around this.