• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Sports Health App Back-End Keepalive Solution

Search This thread

Martin Bieber

Senior Member
Jul 23, 2020
249
32
  • The Health app collects statistics on various sensors, which depend on the hardware of the phone.
  • Android is implemented on top of the bottom layer. The hardware layer implementation varies with vendors, and the power saving mode varies with vendors. Therefore, it is difficult to collect data on multi-vendor devices.
  • Most of the Sports Health Apps want to be able to collect statistics on sports data in the background.
[Background keep-alive]: To make step count more accurate, the app wants to collect the user step count for a long time. The app wants to keep the user step count in the background of different brands of phones (live keep-alive) and continuously collect sensor data. However, the system may kill the user step count. As a result, the count is inaccurate.

Solution 1: HMS Integration Solution

  1. If the data required by users is supported by Huawei HiHealth or Health Kit, the HMS can be integrated to solve the problem. Huawei HiHealth and Health kits can be used in the background of Huawei phones for a long time.
  2. Huawei Push is integrated. The Push function can be used to receive messages when the app process is not running. CPs that have the requirement of pushing messages can be guided to access Push messages, for example, Eyecon.
Solution 2: Guide manual settings

  • Set manual instructions in the app to guide users to manually set keepalive (close battery optimization and allow background running).
  • Multiple Pedometer Apps have such settings, such as winwalk and sweatcoin.
 

Top Liked Posts