data is recorded even if the app is on background. It still stops when screen goes off. This need to be fixed.