I know this seems to be a trivial question but I could not find any concrete answer anywhere on the internet. I saw this very similar question on stackoverflow: How to start Unity application from android activity? but it is exactly opposite from my question. Additionally the android activity must be able to receive some input strings from the Unity application much like how one use system() calls with line arguments to start another program on a PC.
The following is the code I have for a test button event handler for my test Unity app on Android:
private void ExternalAppCallHandler()
{
if(Application.platform == RuntimePlatform.WindowsEditor)
{
Process.Start(@"C:\Program Files (x86)\Notepad++\notepad++.exe");
}
else if(Application.platform == RuntimePlatform.Android)
{
Process.Start("Internet");
}
}
When I use Unity Editor to test, the application successfully opens Notepad++.exe when I click on the test button. However, when I tried to open the "Internet" app on my Samsung Galaxy S2 device it failed. Does anyone knows why this is the case? What should be the correct string for opening another Android application using Process.Start?