i want to know that if some other application has already connected to some Iap, I want to know it and connect to it else I want to connect to some other IapId myself.

For this i need to know which IapId is connected. How can I know this?