이렇게하면 화면을 깨울 수 있습니다. 는 깨우려면 :
보호 무효 웨이크 업() {
//to wake the screen
PowerManager pm = (PowerManager) getApplicationContext().getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = pm.newWakeLock((PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), "TAG");
wakeLock.acquire();
//to release the screen lock
KeyguardManager keyguardManager = (KeyguardManager) getApplicationContext().getSystemService(Context.KEYGUARD_SERVICE);
KeyguardManager.KeyguardLock keyguardLock = keyguardManager.newKeyguardLock("TAG");
//add permission in the manifest file for the disablekeyguard
keyguardLock.disableKeyguard();
// Intent intent=new Intent("android.intent.category.LAUNCHER");
//Intent.setClassName("com.samsung.android.sdk.accessory.example.helloaccessory.provider", "com.samsung.android.sdk.accessory.example.helloaccessory.provider.Main3Activity");
}
이 작동하지 않을 것, 감사 –
이 코드 도움이 그냥 깨워 그 후에 당신은 당신이 할 수 App.Can 열기 위해 사용자의 함수를 호출 할 수 있습니다 특정 오류가 무엇입니까. –
전화기를 몇 분 동안 잠궈두면 CPU 모드가 해제됩니다. 이 모드에서는 더 이상 위의 방법을 사용할 수 있습니다. –