Device Location Functionality¶
IFS Aurena Native apps have two ways of getting the device location:
- Location Tracking happens automatically at a desired interval
- On Demand locations can be requested via procedure
All locations recorded can be seen in the Aurena client in Solution Manager > Aurena Native User Details > Device Locations.
The IFS Aurena Native apps’ location functionality is different on all three platforms due to the platforms’ limitations.
There are two sources of tracking locations in the Windows app:
- A task that runs in the background, even if the app is suspended
- Although this task is designed to run at the desired frequency, it cannot run more frequently than every 15 minutes
- This task simply stores locations in a text file on the device
- A foreground timer that runs according to the desired frequency
- It reads any locations stored in the text file by the background task and records them on the server, as well as recording a new location if required.
This has the following implications for location tracking on Windows:
- Although the app can continue to record locations while it is suspended, they will not be sent to the server until the app is resumed.
- The Windows client can only track locations more frequently than 15 minutes when it is in the foreground. If the desired interval is less than this, while the app is suspended it will only track every 15 minutes.
- The background task that records locations when the app is suspended takes an unknown time to start up. So, if the app starts and soon goes into the background, the first background location recorded may be up to 15 minutes after the desired interval. If the desired interval is less than 15 minutes, then this may be up to 30 minutes since the app started.
There are two things to consider when using Android Location functionality:
- The timer used to take location fixes is the in-built Android one which is not very precise, so intervals of less than 1 minute are not recommended. Even with an interval of 1 minute, locations are sometimes only saved every 2 minutes or so.
- The current implementation gets its locations using GPS alone, rather than also including Wi-Fi data like other implementations. This can mean that locations are not found when inside a building.
The iOS Location Tracking functionality relies on the use of an iOS background task, which has a maximum duration of just under 3 minutes. Any location tracking with a desired interval longer than this involves the chaining together of multiple background tasks. This means that the resulting interval might vary slightly from the one desired.
The behavior of the location functionality is controlled through Client Parameters sent down from the server under the
The LOCATION_ENABLED parameter controls whether the app can use location services at all. To modify this:
- Log into the Aurena client, and go to Solution Manager > Touch Apps > Administration > Applications.
- Search for the App Name.
- The GPS Allowed column shows whether the app projection is allowed to use GPS and is set through the app’s projection, so is read-only.
- The GPS Enabled column shows whether GPS is currently enabled for the app by the administrator. Right-click on the row to enable and disable it.
This setting can also be changed for each device through the "Installed Apps/Devices" screen:
- Search for:
- The App Name
- The username used to log into the device IN CAPS
- Find the device (ordering by Last Access is useful here)
- The GPS Enabled column can either be set to Default which means it follows the app parameter set above, or False to switch it off for that device
- The App GPS Enabled column just shows the state of the app parameter set above
If this parameter is sent down to the device as true, the app’s behavior is then further controlled by the parameters below.
Location App Parameters¶
To view the other location app parameters:
- Log into the Aurena client, and go to Solution Manager > Aurena Native Apps > Configuration > Application Parameters
- Filter for:
- App Name
- Category: Device Location
This should bring up the following 3 parameters:
- Integer (Default: 15)
- The length of time between updates when continually tracking location
- Off/Coarse/Fine (Default: Coarse)
- Whether the app should continually track location and, if so, how accurate the locations should be
- Off/Coarse/Fine (Default: Fine)
- Whether the app should be able to obtain the device location when requested and, if so, how accurate the location should be
Any changes to these parameters will eventually be synced down to the device but can be forced down by re-initializing the device. The device should then follow the behavior of these parameters.