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

Not working #1

Closed
nkrmr opened this issue Jan 24, 2018 · 19 comments
Closed

Not working #1

nkrmr opened this issue Jan 24, 2018 · 19 comments

Comments

@nkrmr
Copy link

nkrmr commented Jan 24, 2018

I implemented your service but i still have the timeout error on Android.
I use RN version 52 on Android 6.0

@Agontuk
Copy link
Owner

Agontuk commented Jan 24, 2018

Hello, can you try the example project and see if it works? Also which device are you using? Does it have a stock rom or other custom roms ?

@nkrmr
Copy link
Author

nkrmr commented Jan 24, 2018

I tried the example and i have the same issue. I use a HUAWEI GRA-UL00.
You can check the example result and the phone properties:
img_2981
img_2980

@Agontuk
Copy link
Owner

Agontuk commented Jan 24, 2018

Can you try getting location with other apps such as Google Maps and see if it works ?

@nkrmr
Copy link
Author

nkrmr commented Jan 24, 2018

Yes it works when i use Google map and geolocation because he fill up the GPS cache of the phone. But how i can have geolocation without use GPS cache?

@Agontuk
Copy link
Owner

Agontuk commented Jan 24, 2018

what's the timeout value, also are you using high accuracy? Can you increase the timeout and see if it still returns timeout error ? Also try restarting the device.

It would be great if you can provide android native logs by using adb shell logcat when requesting location. I saw on google that many people seems to have gps issues on Huawei P8/P9 devices, so not sure what the actual issue is.

@nkrmr
Copy link
Author

nkrmr commented Jan 25, 2018

I have the same result with a high timeout, i use :
{ enableHighAccuracy: true, timeout: 200000, maximumAge: 10000 },

I have the same issue with an S8 phone. I generated a logcat if you to see what appends.

logcat.txt

Best regards

@Agontuk
Copy link
Owner

Agontuk commented Jan 25, 2018

I took a look at the log but didn't find anything useful to understand the actual issue, except for this line

01-25 14:55:09.417  3430  6519 I libgps  : Uknown message 0 in ../../../../tmp/14533598_251844/customers/huawei/k3v3android/delivery/libgps/libgps.cpp:326

The main problem with android devices is that in most of them gps issue exist. I also had timeout issue on my Xiaomi device, but it got fixed after software update. The devices you're testing with (Huawei P8/ Samsung S8), both seem to have this issue too, reported by many users. If you can, upload the logs of samsung device so I can take a look.

I'll try and see if anything can be done to fix this. In the mean time my suggestion is to checkout various location related settings and see if any particular configuration works for you. Also -

  • For Huawei device, try adding your app to the Protected Apps list
  • For Samsung, disable App Power Saving for your app
  • Try with enableHighAccuracy: false
  • Try disabling power saving mode if it's enabled
  • Update your device if any software update is available
  • Update Google play service if there's a new version
  • Try restarting the device
  • Try checking your gps with gps test apps in play store

@antonsivogrivov
Copy link

Same for me here

@antonsivogrivov
Copy link

I test on MEIZU MX5, sometimes it works fine, but more often it's not.

@Agontuk
Copy link
Owner

Agontuk commented Feb 15, 2018

Can you try adding distanceFilter: 0 to the options and see if it helps ? I've added a FAQ section for some possible solutions, check if that helps.

@booker0108
Copy link

@antonsivogrivov Does your MEIZU MX5 come with Google Play Service?

My target users are most likely from China which Google Play Services are not installed on their device.

@antonsivogrivov
Copy link

No, I haven't got Google Play Service

@asifalikhokhar
Copy link

it writes out a error log "Unable to fetch location within 15.0s." in iOS

@kdrich
Copy link

kdrich commented Feb 6, 2019

@asifalikhokhar

Have you verified that the app has location permissions? I.e. if you go into Settings > Privacy > {{yourApp}} and enable location services, do you still have this timeout issue?

@Michaelvons
Copy link

Michaelvons commented Mar 1, 2019

the simple answer is to step out of where you are and go to open space then try again.

Its simple science.

GPS services are affected by thick walls and cars.

This worked for me. No need to edit anything !!!

@Agontuk
Copy link
Owner

Agontuk commented Oct 8, 2019

Closing due to inactivity, feel free to open new issue.

@Agontuk Agontuk closed this as completed Oct 8, 2019
@Sbphillips19
Copy link

I am having a weird issue where when I test on my android s6 the gps location with my internal test track the location piece isn't working. It's a phone without cellular data, so maybe it's related to that, but I have no issues in any of my simulators. Wondering if cellular data would have something to do with it?

@hhunaid
Copy link

hhunaid commented Nov 5, 2019

I had an issue in iOS where the permissions in system settings state "Ask next time" but it would never ask and always time out. Changed it to "Allow" in system settings and it started to work.

@bhumijoshi-gkblabs
Copy link

bhumijoshi-gkblabs commented Jan 24, 2020

@asifalikhokhar

Have you verified that the app has location permissions? I.e. if you go into Settings > Privacy > {{yourApp}} and enable location services, do you still have this timeout issue?

Worked for me Thanks @asifalikhokhar

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

No branches or pull requests

10 participants