Android Java - LocationListener слишком долго выбирает местоположение даже при стабильном соединении ⇐ JAVA
-
Anonymous
Android Java - LocationListener слишком долго выбирает местоположение даже при стабильном соединении
I am trying to fetch users location based on some user action. I am using LocationManager , LocationListener to get the gps co-ordinates . Even when I am using a device with stable connection it takes 15-20 seconds just to fetch the co-ordinates. Is there any way to speed up this process? Is there any way to add timeout to this method.I am attaching the code below .
LocationManager locationManager = (LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE); LocationListener locationListener = new LocationListener() { @Override public void onLocationChanged(Location location) {... I have tried to use different methods but they are still giving me the same issue.
Источник: https://stackoverflow.com/questions/780 ... n-with-sta
I am trying to fetch users location based on some user action. I am using LocationManager , LocationListener to get the gps co-ordinates . Even when I am using a device with stable connection it takes 15-20 seconds just to fetch the co-ordinates. Is there any way to speed up this process? Is there any way to add timeout to this method.I am attaching the code below .
LocationManager locationManager = (LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE); LocationListener locationListener = new LocationListener() { @Override public void onLocationChanged(Location location) {... I have tried to use different methods but they are still giving me the same issue.
Источник: https://stackoverflow.com/questions/780 ... n-with-sta
Мобильная версия