Hi Everyone,
I am unable to retrieve the location with the location sensor with cellular data. I can get the coordinates by using a Wi-Fi connection. When I use cellular data it doesn’t provide coordinates and reverse geocoding doesn’t work. I tried it both in the thinkable live app and the apk version of the app. The issue only applies to android, however. The code I’m using is attached below. Pls, guide me in fixing this issue.
What is the error
message saying?
The error showing is Error: Location provider is unavailable. Make sure that location services are enabled.
I cross-checked the app permission location it was on for the thunkable live app too. Now I’m trying it with a Wi-Fi connection and now it’s not showing the location again. This is not a device issue I tried it with at least 15-20 devices of my friends and family and most of them are facing the same issue it worked for only 2 devices out of 15. Can you tell me how can I fix this?
The first step is to remove (uninstall) the app from the phone.
From Thunkable create a new APK and install it and try again.
Hi,
I tried it in the live app and the apk app I got the same error as before.I made changes to my blocks
(basically removed the map component)
The image is attached below . It still didn’t work and the same error appeared this works perfectly on the live app for IOS device.
Will create a sample app using GetCurrentLocation
and test it on my phone to check.
Yes, @aikansh.dua044gefzj you are correct.
There is a problem that needs Thunkable attention.
Can you check the APK?
I checked it and found working most of the time.
Hi, @muneer It doesnt work for me.
The blocks I am using are
The output
If its working for you can you share the apk with me for the same?
I tried using the apk too and got the same output
I must say that the issue is not fully fixed. It now respond better in DnD but still does not work on StP.
I’m following up with Thunkable to see if it should be reported as a BUG or it’s something they can fix in a day or two.
As it is now Monday, let’s wait a while and will follow up again.
Today is also Labor Day which is a holiday in the U.S. so they may not be working today.
Happy Labor Day @tatiang . Enjoy your day.
Thanking you for the info.
Hi there,
Unfortunately, this seems to be an issue with Expo, who provide the framework we use to build apps.
You can see discussion of this behavior on Expo’s Github here.
Thunkable team member Jose has deployed a partial fix.
Depending on your version of Android, you may need to set EnableHighAccuracy
to false
for Location Sensor to work as expected on your device. I use Android 11 and I don’t need to do this, but Jose reports needing to do this for Location Sensor to work on Android 10.
Unfortunately, since this is an issue with Expo, this won’t be completely resolved until Expo deploy a fix of their own. They have promised for this fix to come out in Expo v43.
Thank you.
I tested it during the weekend and it was working fine. I use Android 9 and did not need to change anything in my project.
@muneer @jane
Hi, the location works but occasionaly for example I have attached a video below showing this I was thinking may be I could do a loop while error was there but wasn’t able to figure it out can anyone help me with that .
The link for the video
I watched your video but could not see the error.
Can you test this
https://x.thunkable.com/projectPage/614a172ecc8c0700111750c0
The button will start / stop the timer which will get the location every second
Hi,@muneer I tried your app it worked fine since it was made on DnD my app is made on default thunkbale platform .The error was that Location provider is unavailable, it continued to show that 3-4 times as shown in video at last it finally showed the location.I was thinking maybe I could use a loop to call the location till there was no error but wasn’t able to figure it out
Let me build a quick project in StP (Snap to Place) UI and we both do the test.