I am installing a package using intent. I can install it alright, but this is what i want to do.
I would call install intent like
startActivityForResult(installIntent,requestCode);
now i want to check in OnActivityResult, whether the app i wanted to install was actually installed or not? So does installer return any result code or extra data indicating this?
But you can specify it before finishing the child activity, and initiate it:
Before returning from your child activity (before explicitly calling
finish()
or inside theonDestroy()
method), you can specify your result:To check the result code, you have to override the
onActivityResult
method of your parent activity: