In Android, there is the concept of Services, which are the ideal way of running application code in the background, independently of the main application execution. So, basically, we need to create a Service method, bind the new background isolate, and run.
Read the official documentation about Android Services: https://developer.android.com/reference/android/app/Service.