I'm a novice developer just getting a feel for Java and android devlopement... I have very little experience and everything I know is self taught... but any that's not the point... my problem is this... I am designing an app that will execute a predetermined shell command and then display the output in a text view... the app so far can execute the script but I'm having problems retrieving and displaying the output... or in other words I'm lost... :-\ .... would anyone be kind enough to point me in the right direction? Below is the code that I have written thus far... my current objective is to capture the output and then place it in the text view
public class MainActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
public void backup (View v) {
TextView console = (TextView) findViewById(R.id.console);
try
{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("free");
}
}
catch (IOException e)
{}
}
}
}