Database created for the Screen state logging
methods added to insert and get the screen state details
Shared preferences added to save latest values
to display the total duration of each state getTotal, getDiff and getLastTS added
Problem occured with previous flow i.e, total is updating in wrong row so using updateTotal method solved the problem'
To show the details dispay disigned
Skeleton code added to the basic activity
Used Utils class to get the database details
Broadcast receiver added and initiated
Method added to insert the database whever screen on/off and displaying it into the database
Controller activity updated with the button to launch
DBAdapter updated with new flow and with correct notation
Updated the showTotalduration method to show the total duration of active and inactive cyles
Updated the database method added getrowcount
updated the show average method to show the average of active/idle cyles