2012-11-29 50 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" />