youtubedl-android
youtubedl-android copied to clipboard
Fix Bug #261 destroyProcessByID not working
The ProcessBuilder() starts process for Python lib. Python lib further creates a process for ffmpeg if used for downloading. So the process returned by .start() method is only capable to kill child process(python) of the app not sub process(ffmpeg). As this(ffmpeg) belongs to the app tree, so we are able to kill it even android has restrctions to kill other's app process. Tree for process: App Process(PID) -Python Process(PID) --FFMPEG Process(PID) Now the issue was that if we use "destroyProcessById()" the FFMPEG process still continue to download the app. So we have to manually kill this as well. This patch will solve the bug.
Close #261