开发者

Sensor stops working on Standby in Android

开发者 https://www.devze.com 2023-02-20 06:25 出处:网络
I registered my Service at the notification manager to prevent Android from shutting me down. I also registered a WakeLock with:

I registered my Service at the notification manager to prevent Android from shutting me down. I also registered a WakeLock with:

    mWakeLock = mPowerManager
            .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, 
                    TAG);
    mWakeLock.acquire();

The Sensor firing rate still goes down when the screen o开发者_StackOverflowf the phone is shut off. Is there any way I can keep up the maximum firing rate even when the phone goes on standby mode?


Are you using some WakeLock to prevent device's CPU from shuttong down?

0

精彩评论

暂无评论...
验证码 换一张
取 消