2019년 3월 25일 월요일

[ Android] Wakelock을 이용한 Back Light AlwaysOn


Back Light AlwaysOn via Wakelock

import android.os.PowerManager;

private PowerManager mPM;
private PowerManager.WakeLock mAlwyasOnWakeLock;

    mPM = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
    mAlwyasOnWakeLock = mPM.newWakeLock(PowerManager.FULL_WAKE_LOCK, "AlwaysOn_BL");
    mAlwyasOnWakeLock.acquire();

댓글 없음:

댓글 쓰기