I am using ActivityRecognitionAPI in Android 4.4.2 to detect activities on the phone. I am using this code to implement this.
The code requests for activity updates after every 15 seconds (I know, the documentation says that this is the upper bound but I have only this app on my device which requests this information) but the app keeps sending intents after every 3-4 seconds. I was thinking to save some battery based on activity but I guess, it would be draining more of it. Any suggestions for improvement?
Trimmed version of logs:
06-01 19:58:19.774: Still 100%
06-01 19:58:23.414: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:27.104: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:27.104: Still 100%
06-01 19:58:30.744: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:30.744: Still 100%
06-01 19:58:34.424: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:34.424: Still 100%
06-01 19:58:38.064: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:38.064: Still 100%
06-01 19:58:41.684: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:41.684: Still 100%
06-01 19:58:46.544: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:46.544: Still 100%
06-01 19:58:50.224: ACCCCCCCCCCTOVOTTTTTTESSS detected
06-01 19:58:50.224: Still 100%