i'm working on app track students' studying time. student can press start button , start studying. , stop when finish studying.
when screen on or phone plugged in,the text view , progress bar updating every second .(i means works fine) when screen off,updating textview , progress stopped after 10 seconds of sleeping phone. think may activity pausing. right?
i tested using:
- partial wakelock
- service
both of these ways make battery drains. there idea case? thanks.
you should use service class, work in background when activity puased