I read through some posts and see many mention that if the phone is in depp sleep mode, i.e during midnight, the serive won't run even if you use startserviceat. May I confirm whether this is true? If it is, then how to solve this since I writing a clock/alarm app in which my alarmservice need to be run exactly on the time set.
If you set the DuringSleep parameter to True then the OS is expected to wake the device even if it sleeps. If it doesn't wake up then there is nothing that you can do (except of maybe preventing the device from sleeping at all).