Android Java - LocationListener слишком долго выбирает местоположение даже при стабильном соединенииJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Android Java - LocationListener слишком долго выбирает местоположение даже при стабильном соединении

Сообщение Anonymous »


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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»