Headless JS doesnt run background processes #27835
Labels
Bug
Ran Commands
One of our bots successfully processed a command.
Resolution: For Stack Overflow
A question for Stack Overflow. Applying this label will cause issue to be closed.
Resolution: Locked
This issue was locked by the bot.
Can't make the background processes run using the official documentation of RN. When the app starts it shuts down immediately and doesn't display any error messages.
React Native version:
System:
OS: Windows 10 10.0.18362
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 1.69 GB / 7.91 GB
Binaries:
Node: 10.16.2 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 23, 27, 28, 29
Build Tools: 27.0.3, 28.0.3, 29.0.2
System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5692245
npmPackages:
react: 16.9.0 => 16.9.0
react-native: ^0.61.4 => 0.61.4
Steps To Reproduce
Describe what you expected to happen: I expect to print a console message when I send app to background
Snack, code example, screenshot, or link to a repository:
MainApplication.java :
MyTaskService.java :
AndroidManifest.xml:
<service android:name="com.myApp.MyTaskService" />
Index.js (React-Native code):
AppRegistry.registerHeadlessTask('SomeTaskName', () => SomeTaskName);
SomeTaskName.js (RN code):
The text was updated successfully, but these errors were encountered: