0

I am trying to open my application on android device, successfully and wanting to send a custom command to that open application via my app already on the device.

Can anyone expand further or use an alternative to what I have.

Any help much appreciated.

Context ctx=MainActivity2.this; // or you can replace **'this'** with your **ActivityName.this**
    Intent i = ctx.getPackageManager().getLaunchIntentForPackage("com.acr.shellterminalemulator");
    i.putExtra("com.acr.shellterminalemulator", "echo 'hello'");
    ctx.startActivity(i);

Also is there a way to open the application, run command and close again but silently without the user seeing or needing to do anything

0 Answers0