Hey guys, so I finally took the time to replicate my Nova setup in LL, as an easy introduction.

Hey guys, so I finally took the time to replicate my Nova setup in LL, as an easy introduction. I’ve still a lot to discover but at least I can start using LL as my daily driver. One question: how would I implement haptic feedback (vibration) when tapping an icon on the desktop? Thanks!

14 Commentsto Hey guys, so I finally took the time to replicate my Nova setup in LL, as an easy introduction.

  1. Lightning does not have vibrate permissions. You either need root or wait for Pierre Hébert​ to return from his holiday break.

    Then you can run the following script:

    getActiveScreen().getContext().getSystemService(Context.VIBRATOR_SERVICE).vibrate(500);

    Where 500 is the duration in ms.

  2. Thanks! I am rooted so the script should work. I’ll look into applying it tonight. It’s a little tough to learn about LL with the documentation being offline ATM. 😉

  3. The script doesn’t automatically work with Root, but in this case you can use the Lightning permission manager to grant the permission.

    https://play.google.com/store/apps/details?id=com.faendir.lightning_launcher.permission_manager

  4. Thanks! The Permission Manager crashes on my Nexus 5X unfortunately. Might be because I’m on 7.1.1…

  5. Victor Pinto ugh, I thought I fixed Nougat… Well then you’ll have to wait until you can either download a permission package from pierre or until I fixed that app.

  6. Victor Pinto Now that I looked into it again, i remember what the problem was: There is no Xposed for Nougat, so an Xposed module (this app is one) cannot run.

  7. That’s it yeah. No Xposed here. Wouldn’t it make more sense to just have root permissions built into LL? I’m not sure I understand the need to download additional stuff just to make scripts work with root.

  8. You can request root from script. But you don’t need root permissions, unless you want to execute elevated shell commands.

    You need android.permission.VIBRATE in this case, and there are only two ways to do that (afaik). One is a package with the same signature as the launcher. Only pierre can create one. The other is an Xposed hook into the system, which I implemented in the Permission Manager.

  9. Lukas Morawietz I see. Maybe I can make this work with Tasker in the meantime as a workaround.

  10. Victor Pinto yes you can use Tasker as a workaround

  11. Victor Pinto yes you can use Tasker as a workaround

  12. There’s a simple way to use haptic feedback (no need for permission), try the following scripts for the items to launch:

    bindClass(“android.view.HapticFeedbackConstants”);

    item.getRootView().performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);

    item.launch();

  13. Pierre Hébert Thanks, will try it out!

Leave a Reply

Your email address will not be published. Required fields are marked *