Accessing device functions

Mobile apps can access device functions by using front calls.

Mobile applications typically want to acces device functions such as geolocation, multi-media content (photos, videos), messaging (contacts database, email, sms).

This can be easily achieved by using front calls dedicated to mobile features. Note that some functions are platform specific, for example to launch an Android activity, or access to iOS device settings.

As a general rule, execute your front call in a TRY / CATCH block to catch errors:
DEFINE status STRING,
       latitude, longitude FLOAT
TRY
    CALL ui.Interface.frontCall("mobile", "getGeolocation",
         [], [status, latitude, longitude] )
CATCH
    ERROR "Could not get coordinates..."
END TRY

For more details, see Genero Mobile common front calls, Genero Mobile Android front calls, Genero Mobile iOS front calls.