============ Problem Description ============
What I am doing now is the communication aspect of the project. But when the Xiaomi 2s test call, the screen is lit, but no screen is not unlocked, only after unlocking the point of the interface. Asked others, said is to see the Android this aspect of the bottom, I do not know what a good solution?
This is the code for power management and unlocking the screen:
Keep your screen solid
PowerManager pm = (powermanager) getsystemservice (Context.power_service);
WakeLock Mwakelock = Pm.newwakelock (Powermanager.full_wake_lock | Powermanager.acquire_causes_wakeup, Lock_tag);
Mwakelock.acquire ();
Screen unlock
Keyguardmanager Keyguardmanager = (keyguardmanager) getsystemservice (Keyguard_service);
Keyguardlock Keyguardlock = Keyguardmanager.newkeyguardlock (Lock_tag);
Keyguardlock.disablekeyguard ();
============ Solution 1============
Quote landlord u010947098 reply:
What I am doing now is the communication aspect of the project. But when the Xiaomi 2s test call, the screen is lit, but no screen is not unlocked, only after unlocking the point of the interface. Asked others, said is to see the Android this aspect of the bottom, I do not know what a good solution?
This is the code for power management and unlocking the screen:
Keep your screen solid
PowerManager pm = (powermanager) getsystemservice (Context.power_service);
WakeLock Mwakelock = Pm.newwakelock (Powermanager.full_wake_lock | Powermanager.acquire_causes_wakeup, Lock_tag);
Mwakelock.acquire ();
Screen unlock
Keyguardmanager Keyguardmanager = (keyguardmanager) getsystemservice (Keyguard_service);
Keyguardlock Keyguardlock = Keyguardmanager.newkeyguardlock (Lock_tag);
Keyguardlock.disablekeyguard ();
I don't know, give you a head.
============ Solution 2============
That is the Xiaomi system comes with the lock screen, you can't block off. At the application level, system-level settings cannot be modified.
The person who makes you look at the bottom of Android, I guess, is a kind of alibi.
You can create a connection to guide the user to cancel out of the lock screen directly into the system. This is available in the developer options.
Android Power Management, screen lock, Xiaomi 2s lit screen, unlocking