Android Open Source - datacollection Screen Lock Receiver






From Project

Back to project page datacollection.

License

The source code is released under:

MIT License

If you think the Android project datacollection listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package edu.fordham.cis.wisdm.actipebble;
/*from   w ww  .j  ava 2  s.c  o m*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Class to notify activities of when the screen locks and unlocks so it can be detected in onPause()\
 * @author Andrew H. Johnston
 * @version 0.01ALPHA
 */
public class ScreenLockReceiver extends BroadcastReceiver {

    public static boolean wasScreenOn = true;

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
            wasScreenOn = false;
        } else {
            wasScreenOn = true;
        }

    }
}




Java Source Code List

edu.fordham.cis.wisdm.actipebble.AccelerationRecord.java
edu.fordham.cis.wisdm.actipebble.AccelerationRecord.java
edu.fordham.cis.wisdm.actipebble.ApplicationTest.java
edu.fordham.cis.wisdm.actipebble.DataManagementService.java
edu.fordham.cis.wisdm.actipebble.GMailSender.java
edu.fordham.cis.wisdm.actipebble.JSSEProvider.java
edu.fordham.cis.wisdm.actipebble.LoginActivity.java
edu.fordham.cis.wisdm.actipebble.MainActivity.java
edu.fordham.cis.wisdm.actipebble.MainActivity.java
edu.fordham.cis.wisdm.actipebble.ScreenLockReceiver.java
edu.fordham.cis.wisdm.actipebble.WearTrainingActivity.java
edu.fordham.cis.wisdm.actipebble.WearableService.java