Android Java - LocationListener слишком долго выбирает местоположение даже при стабильном соединении ⇐ JAVA
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
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Обходчик кучи Jprofiler слишком долго делает снимок и слишком долго отключает сеанс
Anonymous » » в форуме JAVA - 0 Ответы
- 82 Просмотры
-
Последнее сообщение Anonymous
-
-
-
GPS LocationListener onlocationChanged называется даже остаться в одном месте
Anonymous » » в форуме Android - 0 Ответы
- 19 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Android LocationListener, AbstractMethodError в onStatusChanged и onProviderDisabled
Anonymous » » в форуме Android - 0 Ответы
- 15 Просмотры
-
Последнее сообщение Anonymous
-