Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS doesn't work in some android systems:Location request timed out #43

Open
LoongFei opened this issue Jul 9, 2019 · 23 comments
Open
Labels
question Further information is requested

Comments

@LoongFei
Copy link

LoongFei commented Jul 9, 2019

ReactNative: 0.57.8
react: 16.6.3
@react-native-community/geolocation: 1.4.2
I have configured location permissions:'ACCESS_FINE_LOCATION' in AndroidManifest.xml,
but GPS doesn't work in some android systems:Location request timed out

PERMISSION_DENIED: 1
POSITION_UNAVAILABLE: 2
TIMEOUT: 3
code: 3
message: "Location request timed out"

@LoongFei LoongFei added the question Further information is requested label Jul 9, 2019
@sendyputra
Copy link

Try the following steps: (Taken from here)

Turn phone off/on
Turn GPS off/on
Disable any battery saver settings, including Power Saving Mode, Battery Management or any third party apps
Perform an "AGPS reset": Install the App GPS Status & Toolbox, then in that app, go to Menu > Tools > Manage A-GPS State > Reset

@chernandezq
Copy link

From Android 8.0 don't send location in background, alone send a few time per hour, https://developer.android.com/about/versions/oreo/background-location-limits?hl=es-419

There are other way, for example how a reproducer music, That app this in foreground in the notification bar.

@msqar
Copy link

msqar commented Aug 3, 2019

Same problem here. Any solution ? keeps giving me timeout

@msqar
Copy link

msqar commented Aug 3, 2019

Okay, after googling i found THIS on other repository a possible solution.
It works by setting enableHighAccuracy: false. There might be an issue on android for high accuracy locations. Thank God i don't need super accuracy otherwise i would be raging lol. Hope it works for anyone who sees this. I hope there's an upcoming fix for Android.

@Tiagoperes
Copy link

Okay, after googling i found THIS on other repository a possible solution.
It works by setting enableHighAccuracy: false. There might be an issue on android for high accuracy locations. Thank God i don't need super accuracy otherwise i would be raging lol. Hope it works for anyone who sees this. I hope there's an upcoming fix for Android.

It worked for me. Thanks. It would be really nice for this lib to also work with high accuracy. I hope enableHighAccuracy: false is enough for my needs.

@msqar
Copy link

msqar commented Aug 12, 2019

@Tiagoperes glad it worked for you too man... i was frustrated about it as well.

@oswaldjaroslav
Copy link

oswaldjaroslav commented Aug 17, 2019

Ok. So it worked with enableHighAccuracy: false, but this is unacceptable. This means, that location will be taken from WiFi and not GPS. So the phone needs to have wify enabled. Sorry but this is not solution at all. Even if I really dont neeed highAccuracy.

@osvald0
Copy link

osvald0 commented Aug 29, 2019

I have the same issue! Have you any update?

@msqar
Copy link

msqar commented Aug 29, 2019

@osvald0 update to latest version, it's already fixed.

@HugoLiconV
Copy link

I have the last version and I'm still getting the error in some phones:

  • Emulator (works with enableHighAccuracy false or true)
  • Samsung S8 android 9 (only works with enableHighAccuracy false)

Right now the app is using enableHighAccuracy: false and I have received timeout errors from the next devices:

  • Samsung | SM-A105M | Android 9
  • Samsung | SM-N950U | Android 9
  • HUAWEI | PRA-LX3 | Android 8.0.0
  • Motorola | moto e5 play | Android 8.1.0
  • Samsung | SM-A105M | Android 9
  • Hisense | Hisense F20 | Android 6.0.1
  • Lanix | X120C | 8.1.0

@maoAmanda
Copy link

maoAmanda commented Sep 27, 2019

I have the last version and I'm still getting the error in some phones:

  • Emulator (works with enableHighAccuracy false or true)
  • Samsung S8 android 9 (only works with enableHighAccuracy false)

Right now the app is using enableHighAccuracy: false and I have received timeout errors from the next devices:

  • Samsung | SM-A105M | Android 9
  • Samsung | SM-N950U | Android 9
  • HUAWEI | PRA-LX3 | Android 8.0.0
  • Motorola | moto e5 play | Android 8.1.0
  • Samsung | SM-A105M | Android 9
  • Hisense | Hisense F20 | Android 6.0.1
  • Lanix | X120C | 8.1.0

same error here.

device: Xiaomi | Redmi 6A | Android 8.1.0

ReactNative: 0.60.5
react: 16.9.0
@react-native-community/geolocation: 2.0.2

@mlop113
Copy link

mlop113 commented Oct 29, 2019

same error here.

HUAWEI | PRA-LX3 | Android 6.0.1
ReactNative: 0.59.9
react: 16.8.3
@react-native-community/geolocation: 2.0.2

device: Xiaomi | MI 4LTE | Android 6.0.1
ReactNative: 0.59.9
react: 16.8.3
@react-native-community/geolocation: 2.0.2

@Andersonfrfilho
Copy link

Eu tenho a última versão e ainda estou recebendo o erro em alguns telefones:

  • Emulador (funciona com enableHighAccuracyfalso ou verdadeiro)
  • Samsung S8 android 9 (funciona apenas com enableHighAccuracyfalsos)

No momento, o aplicativo está em uso enableHighAccuracy: falsee recebi erros de tempo limite nos próximos dispositivos:

  • Samsung SM-A105M Android 9
  • Samsung SM-N950U Android 9
  • HUAWEI PRA-LX3 Android 8.0.0
  • Motorola moto e5 jogar | Android 8.1.0
  • Samsung SM-A105M Android 9
  • Hisense Hisense F20 | Android 6.0.1
  • Lanix X120C 8.1.0

same error here.
next Flutter projects
--'

@awmoreira
Copy link

Hi guys! Any solution?

@klosowsk
Copy link

klosowsk commented Jan 4, 2020

Same here!

@yasir-netlinks
Copy link

Hi everyone , any solution on this guys!!

@HugoLiconV
Copy link

HugoLiconV commented Jan 12, 2020

Hey everyone! I just found a solution, I replaced this library for react-native-geolocation-service and it solved the problem, the API is the same so the change it's easy. I tested this with a couple of devices and everything seems working fine.

@rafaelsevla
Copy link

Hey everyone! I just found a solution, I replaced this library for react-native-geolocation-service and it solved the problem, the API it's the same so the change its easy. I tested this with a couple of devices and everything seems working fine.

i love you.... ❤️

@ranjansharma1412
Copy link

react-native-geolocation-service fixed my issue thanks a lot

@nathantqn
Copy link

react-native-geolocation-service works fine in couple of days but then the Location request timed out error re-appeared and I don't know why, is there anyone face the same problem like me?

@gregoryfm
Copy link

@nenjamin2405 I'm facing the same issue. Did you find any solution? thanks

@vijaysaini83
Copy link

Hey everyone! I just found a solution, I replaced this library for react-native-geolocation-service and it solved the problem, the API is the same so the change it's easy. I tested this with a couple of devices and everything seems working fine.

This is great !!!

@satya-imaginea
Copy link

even with react-native-geolocation-service have the same issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests