Turn on GPS on devices

Happy new year all.

Does appsheet automatically turn on Location setting on devices or do user have to turn on location themselves.

Stay Blessed
Dessie

The user has to allow Appsheet to access location on their device. They’re prompted when a Location feature on the app is trying to be used, but they can easily hit decline which will return a 000, 000 location tag.
Simple way to help enforce this is to make the data INVALID if the amount of location is 0. Then they’ll call you saying it’s not working, and then you need to tell them to enable their location to fix the problem. :slight_smile: That’s what I do at least.

1 Like

Thanks Spencer. Please help me with that part. How do i make the data invalid?

The column collecting the location information is the LatLong type column. The initial value of that column should be HERE(). In the “Valid If” space under “DATA VALIDITY”, make the expression [Column Name]<>0
Essentially saying if the LatLong is anything besides 0, make that entry valid.

@Spencer_Jones
Unfortunately it will not work that way…

@dessie_moonsamy
Below will be a more robust way to ensure that:

AND(
	OR(
		LAT(HERE()) > 0.000000,
		LAT(HERE()) < 0.000000
	),
	OR(
		LONG(HERE()) > 0.000000,
		LONG(HERE()) < 0.000000
	)
)

OR

DISTANCE(HERE(), HERE()) > 0
1 Like

@LeventK
It’s how my 3 of my current apps are setup. Yours also works but keep in mind that some Latitude values and Longitude values could be negative. So if you are only validating positive values, it may reject the result even though it is a valid Latitude or Longitude.

@Spencer_Jones
You are correct. I was editing my expression whilst you’re commenting on that way. Thanks for the sweet reminder.

@LeventK
I’m just seeing your snippet as well. I’ll need to get in and make sure it’s still working if an update passed since I had that in there.

Thank you guys