I have a Runnable that transfers data(a few hundred files) from an android device to a PC by doing the following in its run method
- Creates a process and executes a command using Runtime.exec(CMD)
- The CMD is a command that transfers data from a device to the PC that runs this thread. (This is an adb pull command for android )
I have a main program that creates a Thread and starts this runnable. The runnable starts running and it executes the "adb pull" command and starts transferring the data, BUT it seems to pause soon after before it completes the full transfer. IF I force quit the main program, the transfer runs to completion.
Also had I executed the command from the main program itself without using another thread, I face no issues.
Why am I facing this issue?