Update HeadlessJSAndroid.md explaining parameters

Summary:
HeadlessJsTaskConfig parameters can be unclear, so I added one more parameter that was left set by default and the respective comments.
Closes https://github.com/facebook/react-native/pull/16054

Differential Revision: D5881373

Pulled By: hramos

fbshipit-source-id: 3d271f73921417d82e3a2c7a1aaabe92aef7ec69
This commit is contained in:
Flavio Li Volsi 2017-09-21 08:36:03 -07:00 committed by Facebook Github Bot
parent 1aeb767a37
commit f25233b15f
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ public class MyTaskService extends HeadlessJsTaskService {
return new HeadlessJsTaskConfig(
"SomeTaskName",
Arguments.fromBundle(extras),
5000);
5000, // timeout for the task
false // optional: defines whether or not the task is allowed in foreground. Default is false
);
}
return null;
}