Location considerations for a personal safety application

Hi,

I’m developing an application for personal safety and looking for some general advice on using location services with regards to battery life. We are targeting Galaxy Watch Active 2 using Tizen 4 and .NET. (Side question: would a native app would be smarter choice for battery life?)

We have geofence areas and want to create an alarm when the watch leaves or enters an area. We have other wearables that send their location periocally and we do the detection on the server side. But using boundaries (CircleBoundary, PolygonBoundary and the ZoneChanged event) seem the way to go. Detecting on the device means fewer network calls but will the location services use more energy?

We also want to send periodic heartbeats, say with 15-30 minute intervals. Should I create an alarm that requests a location or should I set an interval on the same locator that uses the boundaries?

Where can I learn about the different location types? Gps and Wps are fairly obvious but how does Hybrid work and what is Passive?

Hi,
Battery consumption is always a major issue in location service. So it would be better to choose your service carefully. I would like to recommend some calculation of the battery consumption according to the following chart (this chart is for GPS power consumption).

Operation Power consumption Description
Full acquisition 32~40 mA For the first fix, after 2 or 3 days have passed.
Tracking 13~16 mA For the first fix, while continuously tracking the location where the satellite signals are very strong.
Low power tracking 3~5 mA GPS chipset supported in a low power mode.

Find this chart in the following page. You will also find some best practices regarding location service and power consumption here. You will also find the following chart which is indicating the relation and comparison between the accuracy and power consumption among location service methods (GPS, WPS, HYBRID).

Method Location source Description
LOCATIONS_METHOD_HYBRID GPS, Wi-Fi AP, cell information This method allows the device to use all location sources. It provides the best effort with the highest power consumption.
LOCATIONS_METHOD_GPS GPS This method is used by navigation applications requiring high accuracy. The power consumption is lower than in the hybrid method but higher than in the WPS method.
LOCATIONS_METHOD_WPS Wi-Fi AP, cell information This method receives location information from an external positioning server that computes the approximate location based on the Wi-Fi AP or mobile network cell tower. It provides the lowest power consumption and the weakest location accuracy.

Details information regarding the location service will be found in the following page. Moreover, there are several sample applications for helping developers. Please check the following link. Find the source code on the GitHub.

Please let me know if this helps you :smiley:

1 Like

Very helpful links, thank you! The key takeaway here is to always check the native documentation even though writing the app with C#.

I have a working implementation already and the battery life is about 48 hours with the location services running. I’ll try to improve this further by changing from Hybrid to Gps. I’m using boundaries and the Locator.ZoneChanged event and it works great!

We also want to send periodic heartbeats, say with 15-30 minute intervals. Should I create an alarm that requests a location or should I set an interval on the same locator that uses the boundaries?

The maximum interval for Locator.LocationChanged is 120 seconds! So I will use an alarm instead and read the location from the locator instance when the alarm fires.

1 Like

Hi,
It’s really great to hear that you find that helpful :smiley:. You can check the push notification documentation. This might helpful for sending notifications to the devices.