At the moment I execute a native process using the following:
java.lang.Process process = Runtime.getRuntime().exec(command); int returnCode = process.waitF
If you're using Java 8 or later (API 26 or later for Android) you could simply use the waitFor with timeout:
Process p = ... if(!p.waitFor(1, TimeUnit.MINUTE)) { //timeout - kill the process. p.destroy(); // consider using destroyForcibly instead }