Code to fetch current city and country name with java and Appium

Hi…my application is reflecting current city and country dynamically so I need to verify if its correct. I require to get current location city and country.

Have you looked at get-geolocation?

yes This will get me lat long…but how to get name of city n country by this?

Tons of ways. Start with a google search:

I meant through script

Plenty of scripts in there. That Stack Overflow link shows several very thorough examples.

There’s no reason that you can’t type ‘java’ on the end of the search:…0…1c.1.64.psy-ab…0.5.394…0.0.vg7kjfJ2czc