I have two application and i want to start second application from first one when button pressed. However i dont want the second one to come front. It will do its work on background. How can i do this? Please give me a guide. I tried this but it opens the application and comes front and thats not what i want
Intent intent = getPackageManager().getLaunchIntentForPackage(
"com.example.abc");
if (intent == null) {
Toast.makeText(this, R.string.app_not_found, Toast.LENGTH_SHORT)
.show();
} else {
intent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent .putExtra("str", "str");
startActivity(intent );
}
Thanks in advance