Skip to content

Commit 6fe3c13

Browse files
committed
Added call to finishTask to reproduce the crash
1 parent 5d527b7 commit 6fe3c13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

android/app/src/main/java/com/awesomeproject/MainApplication.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
1212
import com.facebook.soloader.SoLoader
13+
import com.facebook.react.jstasks.HeadlessJsTaskContext
1314

1415
class MainApplication : Application(), ReactApplication {
1516

@@ -39,5 +40,8 @@ class MainApplication : Application(), ReactApplication {
3940
// If you opted-in for the New Architecture, we load the native entry point for this app.
4041
load()
4142
}
43+
HeadlessJsTaskContext
44+
.getInstance(reactNativeHost.reactInstanceManager.currentReactContext)
45+
.finishTask(123)
4246
}
4347
}

0 commit comments

Comments
 (0)