Forum Xamarin.Android

How to start a process using C#?


I would like to either execute a shell command or start a process on an android device.

Process checkForUpdates = new Process();
checkForUpdates.StartInfo.FileName = @Tools/bash.exe;
checkForUpdates.StartInfo.Arguments = "python -V";
checkForUpdates.StartInfo.UseShellExecute = false;
checkForUpdates.StartInfo.RedirectStandardOutput = true;
checkForUpdates.StartInfo.RedirectStandardError = true;
checkForUpdates.StartInfo.CreateNoWindow = false;
checkForUpdates.EnableRaisingEvents = true;

Running the above code through a background worker makes the code execution stop. Any ideas?

Thank in advance

Sign In or Register to comment.