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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -