how do i programmatically find out whether this phone has a wallet with at least a certain arbitrary amount of bitcoin in it?
It is not possible, by design. Like Jestin said, the wallet's balance is not the business of other apps.