How to get the geo location of a device in Android using Appium

I need to get the device latitude, longitude and altitude of an Android device using Appium. Are there any in built method to get the geo location information like setLocation() method or do we have to use ADB commands to find the device Geo location.