2012-06-28 52 views
0

我有一個應用程序,有一個服務..其正常工作時,屏幕上... 但服務不工作時,屏幕鎖定.... 通知不工作時,屏幕被鎖定...如何在屏幕鎖定時使服務正常工作?

private void _startService() { 
    Toast.makeText(this, "Mulai service", Toast.LENGTH_SHORT).show(); 
     timer.scheduleAtFixedRate(new TimerTask() { 
      public void run() { checkAlarm(); } 
     },0, 60000); 
} 
+0

檢查有關PARTIAL_WAKELOCK這個帖子:[http://stackoverflow.com/questions/7360234/partial-wake-lock-and-thread-running-in-a - 服務](http://stackoverflow.com/questions/7360234/partial-wake-lock-and-thread-running-in-a-service) – ekholm

回答