2012-11-29 59 views

回答

2

使用電源管理器來喚醒屏幕

PowerManager pm = (PowerManager) getApplicationContext().getSystemService(Context.POWER_SERVICE); 
     WakeLock wakeLock = pm.newWakeLock((PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), "TAG"); 
     wakeLock.acquire(); 

和清單

< uses-permission android:name="android.permission.WAKE_LOCK" />