-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I am building a running app that shows a timer. When the timer reaches 0 seconds a sound is played. I use React Native Sound for playback. I use an interval on componentDidMount for counting the seconds:
componentDidMount() { this.recalcTotalSeconds(); KeepAwake.activate(); this._interval = setInterval(() => { this.step(); }, 999);} It works nicely as long as the phone is unlocked. When the phone is locked the interval is not fired and the sound is not played. As a first measure I uploaded a version with Keep Awake that prevents the screen from locking. I am looking for a battery-friendly solution.