• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[No root] Finally, an app to enable native Lift To Wake (lockscreen)

Search This thread

bwx074

Member
Mar 21, 2020
10
43
OnePlus Lift To Wake

TL, DR. Where is the download?

github.com/xubowenhaoren/OPLiftToWake/releases

What does it do?

This is a simple app to enable Lift To Wake for OnePlus 7 series.
It is not the Lift To "Ambient Display" in the stock Settings App; it enables the true Lift To "Lock Screen" like other phones.

Why do I want this feature?

You've probably already known that OnePlus, in Android 10, reveals the notification content on the lock screen after Face Unlock.
But to see those notifications, you either need to:

1. Pick up the phone and unlock with your finger at the Ambient Display. A two-step process.
2. Pick up the phone and press the power button. Again, a two-step process.

Now with the app, you can pick up the phone and the lock screen immediately shows up.

How does it do this?

It listens to the native system sensor (`oneplus.sensor.pickup`). In my testing, it is very power efficient.

What phones does it support?

I have tested this on a OnePlus 7T with Android 10. It should also work with other OnePlus 7 series.
Note that for earlier OnePlus phones, there is also a [pickup sensor] but with a different name.
If you want this app to work with earlier OnePlus phones, you should try replacing this line in `Utils.java` with the correct sensor name:

```
mSensor = Utils.getSensor(context, mSensorManager, "oneplus.sensor.pickup");
```

How do I use it?

You probably want to turn off the Ambient Display first.

After installing the app, turn on the "Lift To Wake" toggle.
You should also consider turning off the battery optimization of the app for a more consistent background performance.

Do I need Magisk for this?

No, it is root-free.

Credits

Much of the code is from the Lineage OS team.
Other code references can be found in the code comments.
 

bwx074

Member
Mar 21, 2020
10
43
This works great. Any way to get it to run automatically after a reboot? I have to enable after every reboot.

Thanks, again!

I've made efforts to enable this service after reboot. It wasn't successful, however. Oxygen OS has a strict whitelist of apps that may start automatically after a reboot. One way to work around this is to use Accessibility Service, but that could cause more battery drain. Lol, I think it's better to leave things this way.
 

Dmitriy9119

Member
Nov 26, 2014
23
12
Nice app. Thnks

It works great for op7t, but doesn't work for Op7.

On op7, the screen lights up, but faceunlock is not available.
You need to click on faceicon first to work (screens in atach).
But, if you unlock op7 via the power button (second screen in atach) - faceunlcok works great!

Is there any solutions for op7?
 

Attachments

  • !!19241806.jpg
    !!19241806.jpg
    112.2 KB · Views: 1,349
  • !19241806.jpg
    !19241806.jpg
    67.3 KB · Views: 1,342
Last edited:

ysco

Senior Member
Oct 23, 2013
541
237
Very useful mod, thx for that
Only issue that it doesn't work anymore after some hours,i need to start the app again to get it working again for a few hours. I already have disabled battery optimisation. Any ideas to fix this?

Regards ysco..
 

m1606

Member
Dec 5, 2018
37
0
OnePlus 7T
This app is great, something I've been looking for a while. But, it doesn't work consistently. It stops after a few hours after I enable it. Then I have to open the app and then it will 'realize' the switch is still on and start working again. Is there a solution for this?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    OnePlus Lift To Wake

    TL, DR. Where is the download?

    github.com/xubowenhaoren/OPLiftToWake/releases

    What does it do?

    This is a simple app to enable Lift To Wake for OnePlus 7 series.
    It is not the Lift To "Ambient Display" in the stock Settings App; it enables the true Lift To "Lock Screen" like other phones.

    Why do I want this feature?

    You've probably already known that OnePlus, in Android 10, reveals the notification content on the lock screen after Face Unlock.
    But to see those notifications, you either need to:

    1. Pick up the phone and unlock with your finger at the Ambient Display. A two-step process.
    2. Pick up the phone and press the power button. Again, a two-step process.

    Now with the app, you can pick up the phone and the lock screen immediately shows up.

    How does it do this?

    It listens to the native system sensor (`oneplus.sensor.pickup`). In my testing, it is very power efficient.

    What phones does it support?

    I have tested this on a OnePlus 7T with Android 10. It should also work with other OnePlus 7 series.
    Note that for earlier OnePlus phones, there is also a [pickup sensor] but with a different name.
    If you want this app to work with earlier OnePlus phones, you should try replacing this line in `Utils.java` with the correct sensor name:

    ```
    mSensor = Utils.getSensor(context, mSensorManager, "oneplus.sensor.pickup");
    ```

    How do I use it?

    You probably want to turn off the Ambient Display first.

    After installing the app, turn on the "Lift To Wake" toggle.
    You should also consider turning off the battery optimization of the app for a more consistent background performance.

    Do I need Magisk for this?

    No, it is root-free.

    Credits

    Much of the code is from the Lineage OS team.
    Other code references can be found in the code comments.