This can be done through a GPS (Global Positioning System) module, via a mobile device or wireless networks. Android contains an android location package which provides the API to determine the current geographical location. For more information, there is a tutorial which
explained in Android Location API - Tutorial [10].