I try with this ways but did not get correct way to do this.I am using this code to open another app.
Now i want to know when ever i close or open my second app then i want to get some result of closing second app or opening second app in to my first app.Can it is possible or not if it is possible to get any responce of opening second app or closing second app.
Intent intentt = new Intent(Intent.ACTION_MAIN);
intentt.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intentt.setComponent(new ComponentName("com.example.abc","com.example.abc.MainActivity"));
startActivity(intentt);
This code open my second app after press back button my second app will close at the time of close and opening second app i want to get some result at the time of second app opening or closing some result,i also follow these links also.
I also follow this link to explore or find solution
how i can do this...Thanks in Advance.
with this code my second app is open but after closing second app how do i find or handle callback of second app.