Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get accuracy of GPS in Android

Tags:

android

gps

I need to check the accuracy of GPS... but when i use location.getAccuracy then it doesn not return me any value... Does it take time..If it takes time then how long does it takes?

like image 391
coderslay Avatar asked Jul 02 '11 06:07

coderslay


1 Answers

In android devices, mainly you can have two sources by which you can get position info : GPS_PROVIDER and NETWORK_PROVIDER

GPS_PROVIDER uses your GPS chipset to get a position fix. This has a greater accuracy.

NETWORK_PROVIDER uses the information from cell-tower to triangulate your location. Hence its accuracy is not as quite good.

You can get your accuracy info from Location.getAccuracy() or from NMEA data.

Does it take time..If it takes time then how long does it takes

Once you've started getting fixes it won't take much time. Time to first fix can be 30 seconds to 15 minutes. It depends on your GPS chipset, terrain conditions, cold/warm start etc.

To choose the best provider read this article

like image 94
Reno Avatar answered Oct 19 '22 19:10

Reno