My app is trying to install an APK.
Intent installIntent = new Intent(Intent.ACTION_INSTALL_PACKAGE); installIntent.setData(Uri.fromFile(new File(pathToApk))
Found the culprit.
*installIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);*
Though the system brings the existing instance of my activity back to life it is in the new TASK stack. So the system cancels the activityForResult before it starts the new TASK.
Thank you