Location Sensor Unable to retrieve location with cellular data

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.

1 Like

What is the error message saying?

1 Like

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?

1 Like

The first step is to remove (uninstall) the app from the phone.
From Thunkable create a new APK and install it and try again.

1 Like

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.

1 Like

Will create a sample app using GetCurrentLocation and test it on my phone to check.

1 Like

Yes, @aikansh.dua044gefzj you are correct.

There is a problem that needs Thunkable attention.

@domhnallohanlon @jane @webinar.dokter

1 Like

@staff

1 Like

Can you check the APK?

I checked it and found working most of the time.

1 Like

Hi, @muneer It doesnt work for me.
The blocks I am using are
image
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

1 Like

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.

3 Likes

Today is also Labor Day which is a holiday in the U.S. so they may not be working today.

2 Likes

Happy Labor Day @tatiang . Enjoy your day.

Thanking you for the info.

3 Likes

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.

2 Likes

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.

1 Like