Another option for you, besides @Signare answer , is to use the Simple Location API , which is available for OS 5.0 and higher.
Download the source code from github and include it in your project.
Then, to get location corrections without using GPS, try the following:
try { simpleProvider = new SimpleLocationProvider(SimpleLocationProvider.MODE_GEOLOCATION); } catch(LocationException le){
You can also use the SimpleLocationListener interface if you want your code to return with location data at a given interval.
In OS 6.0, this API adds the ability to specifically select a cellular network as a location provider or use a Wi-Fi network. In OS 5.0, you are limited to these three options:
MODE_GEOLOCATION . It works strictly in geolocation mode.
MODE_GPS - Works strictly in GPS mode (it is autonomous / autonomous).
MODE_OPTIMAL . It works both in geolocation mode and in GPS mode based on availability.
But using MODE_GEOLOCATION or MODE_OPTIMAL , you can get location corrections without using a GPS chip.
source share