I am developing a hybrid application for Tizen Wearable 2.3. For the application, accelerometer and gyroscope sensor data is extracted and written to a file in native service application at a frequency of 100Hz.
However, in certain trials I see that data is lost after few minutes upon switching off WiFi. For instance, if I record the data for 10 minutes, while keeping the app in background (display off) and turn off wifi during the fifth minute, the file shows data for only first 5 minutes, the remaining data is not written to the file. How can I stop this behaviour?
Thanks.
Finally, found that I had not obtained the device_power_request_lock
on CPU.
device_power_request_lock( POWER_LOCK_CPU, 0);
The function locks the given lock state for infinite time, and doesn't allow CPU to go into sleep state, which was causing the data loss. To unlock CPU after session is recorded:
device_power_release_lock(POWER_LOCK_CPU);