I'm an iOS developer so I don't know much about Android, but the way that iOS works is that each app is inside its own "sandbox" so that the apps cannot call actions on each other such as closing. This is done as a security measure. More on App Sandboxing (paragraph 'The App Sandbox').
The only way apps can interact is through urls such as "tel:1-408-555-5555" to open the phone app and pre-enter the phone number 1-408-555-5555. More on device urls here. You can custom configure urls for your app, for example Facebook and Twitter have their own app urls you can call from your app to open up Facebook or Twitter if the user presses a certain button or whatnot. But after that, all control of the device and the user interaction is up to Facebook or Twitter, not your app. If they are posting a status and the Facebook app closes after that, then control is returned to your app, but there is only one dominant and active app at a time.
As far as volume, I'm not 100% sure but I don't think you can control silent/sound since that is controlled by a hardware switch on the side of the device.
Overall, no, Apple doesn't let you interfere with other apps. If you have an app running in the background, it cannot pick up on activity done within another app (due to the sandbox).
So I dug through the Android docs a bit and found this article on interacting with other apps. Most interestingly is this subarticle which seems to indicate that you can collect a result from another app. This might be what you're looking for? However I don't know how you would collect results form the lock keypad as that's not really an "app", more of just the OS itself.
It seems that this use is more of like opening contacts and getting the info for which contact the user selected, which iOS supports that functionality too. But there's no like "listening in" on just any app. Again, not an Android guy.