ACTION_USER_PRESENT ve ACTION_SHUTDOWN
uygulanması eylemleri almak için uygulamanın Manifests
<receiver android:name=".UserPresentBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.intent.action.ACTION_SHUTDOWN" />
</intent-filter>
</receiver>
eklemek bu bir Yayını Alıcı Eylem burada ACTION_USER_PRESENT yok, değil mi
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class UserPresentBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context arg0, Intent intent) {
/*Sent when the user is present after
* device wakes up (e.g when the keyguard is gone)
* */
if(intent.getAction().equals(Intent.ACTION_USER_PRESENT)){
}
/*Device is shutting down. This is broadcast when the device
* is being shut down (completely turned off, not sleeping)
* */
else if (intent.getAction().equals(Intent.ACTION_SHUTDOWN)) {
}
}
}
[Androi'nin muhtemel kopyası d -, üzerinde ekrana değil telefon kilidini olayı algılamak] (http://stackoverflow.com/questions/3446202/android-detect-phone-unlock-event-not-screen-on) –