bash - How can I check if a computer exists on my network WITHOUT IP (i.e. by device name only)?
Dynamic DNS service would work. Get your laptop to update your dynamic domain with it's local ip, and then whenever your phone connects to a new wifi network, resolve that domain, if you get a hit, you're either good or happened to find someone with the same local ip!

Similar to that, you could get your laptop to post it's ip to a server somewhere (web, email, w/e) that you can retrieve from a script on your phone.

Short of setting up a DNS server, I'm not sure there is any means for resolving host names that aren't named in your local configs.