Check if Onion URL is live

I am making an android application in JaVA. There is an onion Url that i want to check is live or not. Basically Onion url is mapped to an iP address, so is there any java library or APi that can assist in determining the check ?
Any help in this regard will be appreciated