문제

I'm searching about some code to force my app to get GPS location quickly ASAP

i don't wanna to use INTERNET or cell , i want to get GPS faster as possible

is there is any code to do that ? or just waiting gps to pick points from location manager ?

my code :

   public class StoPoints extends ListActivity implements LocationListener
    protected LocationManager locationManager;
protected LocationListener locationListener;
    locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
            0, this);

    @Override
   public void onLocationChanged(Location location2) {
    location = location2; 
}
도움이 되었습니까?

해결책

is there is any code to do that ? or just waiting gps to pick points from location manager ?

The code you have is as fast as it is going to get. How quickly you get GPS fixes is dependent upon a number of things, including device and the general environment (e.g., can you receive signals from enough satellites?).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top