Network provider generates a 2 copies of a location

view story

http://stackoverflow.com – I'm trying to generate a location first through the gps provider if I get a null I'm generating through the network provider. My problem is that the network provider generates the same location twice.. I send the information to the db and it sends the same location with the same time(same seconds!). Here is some code: gpsLocation = requestUpdatesFromProvider(LocationManager.GPS_PROVIDER, R.string.not_support_gps); networkLocation = requestUpdatesFromProvider(LocationManager.NETWORK_PROVIDER, R.string.not_support_gps); // Update the UI immediately if a location is obtained. if (gpsLocation (HowTos)