One-minute periodic service
问题 What's the correct way to perform a periodic task? My implementation does not seem to work properly: when the screen is on and I am using the phone the service method is ran perfectly in time. However when the phone is locked the service is ran at very large and random intervals (e.g: 10:30 10:32 10:45 10:46 10:49 11:00...) Here is the code: MAIN SERVICE CLASS: @Override public void onCreate() { pm = (PowerManager) getSystemService(Context.POWER_SERVICE); mNM = (NotificationManager