How to use the Expression Editor + how to use native components such as GPS?


Three questions:

1) How to check if GPS is enabled on device? 

2) How to formulate a correct function for setting the lat/long of the camera of the Google map?

Latitude is a decimal, so how can I check to see if the decimal is null and assign a value?

The following gives the error that I should compare boolean value in my IF.

If(CurrentLocation.Latitude = NullIdentifier(), 51.035959, CurrentLocation.Latitude)

3) Is there any documentation on the Expression Editor? As in, syntax, usage, scope etc

Hi Lars,

1) Forum search is your friend!

2) NullIdentitier() is exactly that, a NULL identifier. Latitude is not an identifier but a Decimal, so the compare fails (even though the error message is a bit cryptic). Since Decimals cannot have a NULL value, you need some other way to detect "not initialized". You could e.g. set it to an invalid latitude.

3) I'm not sure there's any specific documentation on that. What exactly do you want to know?