linux - Any way to run shell commands on android programmatically? -
Is there a way to run a terminal command on my application and access data on my UI? Specifically top
.
See log collector as an example. Here it is.
The key is here:
ArrayList & lt; String & gt; Commandline = new Array's & lt; String & gt; (); CommandLine.add ("logcat"); // $ non-NLS-1 $ [...] process process = runtime.gettime (). Exec (commandLine); Buffered buffferedReader = new BufferedReader (new InputStreamReader (process.getInputStream ()));
Comments
Post a Comment