In this recipe we'll be building out an Android equivalent to the previous recipe. This recipe will also use the native Android layer to create a new process, keep that process running by sleeping for five seconds, and allow user interaction via the button to exhibit that the app's main processing thread is not blocked.
While the end result will be very much the same, spawning a new process in an Android project is handled a bit differently from iOS. This recipe will make use of the native AsyncTask function, specialized for handling short-running background processes, to allow execution in the React Native layer without blocking the main thread.