Hi, I'm working in Sandbox environment.
Is it possible to unlock a device of Clover Flex with passcode through code? When working from home, I sometimes find the device felt asleep. I can wake up the terminal through the following code, but afterwards I cannot proceed a payment.
private void wakeUpDeviceForciblyForDebug() { this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); PowerManager.WakeLock wl; PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "My Tag"); wl.acquire(); KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE); KeyguardManager.KeyguardLock keyguardLock = keyguardManager.newKeyguardLock("TAG"); keyguardLock.disableKeyguard(); }
I'm guessing this happens due to lack of passcode while waking up the terminal by code. So, I'm wondering if it's possible to unlock the device programmatically either by "Quick Access" or with passcode. Of course I can count on my collegues to unlock the terminal with passcode, but I prefer to not disturb them too much.
Any advice would be appreciated,
Thank you