Restart the morning alarm by detecting the System Boot to fix the System-shutSown-Clear-Alarm problem

1. Restart the morning alarm by detecting the System Boot to fix the
System-shutSown-Clear-Alarm problem
2. Need do more test on it
Add Phone Acc Data Compression part
One Bug of Acc fixed/One text changed
Merge with User Login/ Admin Assign part
Change ID as identifier instead of BlueTooth

1. ID as identifier
2. Reading Pin number from sharedpreference
Boot BroadCast
Restart the App after the phone boot up
Add Boot Morning Suvey Trigger & Morning Time Check
Check ID before starting SensorService
Morning Report/Random part1

half down.
To be completed at home
Morning Report/Random part2

1.Morning Report:
1st check whether survey is morning report
2nd store random survey start time
3rd call random survey functions
4th store morningReoprtIsDone flag to local
2. Random Survey
0. cancel the old setting before applying the new setting
1. read start time from local storage when triggered by morning report
2. compare trigger time with current time and cancel unnecessary ones
3. when starting service, if flag is false, schedule the survey from
11:59
TO DO: 12:00A.M set Morning Report Is Done flag to false
Random Survey Improvement

simplified function and reduce the unnessary creation of TimerTask
random survey/morning report improvement2

1. Morning:
*  check whether mornReport was submitted today
* If not, do the following thing. Otherwise, do nothing.
2. Random
* First Check whether random survey is already triggered.
* set the random survey start time at 11:59 if morning survey is never
set.
* Otherwise use old settings stored in the local storage.(for the case
when App is revoked from unexpected crash)
bedReport before_9:00P.M_check alertDialog
BedReport Trigger Partially Stop
Add Reschedule Collection Restart function
Add Restart Location Part
Add Handler to cancel the dialog

1. Using a handler to cancel the alertDiaLog before SuveyPinCheck was
closed to prevent window leak
2. SensorService change a flag.
cancel the dialog before PinCheckActivity is closed

1. Instead useing handler, add function in SurveyNotCompletedAlarm
TimerTask
2. add some safer function to deal with the alarm mechanism
remove a method