I am trying to get the Android application to install the APK on sdcard programmatically, but I ran into some small problems.
Here is how I do it:
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType("ApkFilePath...","application/vnd.android.package-archive"); activity.startActivityForResult(intent,5000);
Now that everything is working fine, it starts the package manager, and I can control what to do when the manager finishes installing the APK.
But the problem is that if at the end of the installation the user clicks "Open" instead of "Done", the "OnActivityResult" method is not called, because the manager still exists. and this is another problem for another system requirement.
Is there a way to find out when the user chose βOpenβ at the end of the package manager, or is there a way to make the dispatcher display only the buttons that I want to display?
In fact, you can use the help, I'm looking everywhere and do not see a solution
source share