When i start application from another one through
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory("android.intent.category.LAUNCHER");
intent.setComponent(new ComponentName("com.app.app", "com.app.app.Main"));
startActivity(intent);
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> runningProcInfo = activityManager.getRunningAppProcesses();
Log.e("TAG", "runningProcInfo.get(0).processName "+runningProcInfo.get(0).processName);
And I am getting Home application package
What is wrong in my code?