We have moved to a new Sailfish OS Forum. Please start new discussions there.
21

Add 'Flashlight switch' (introduced in 2.0.2) to Lock Screen options

asked 2016-08-01 19:12:57 +0200

czdosi gravatar image

updated 2016-08-01 20:10:55 +0200

There is nice feature introduced in Sailfish 2.0.2: "'Flashlight switch' for events view Actions and shortcuts".

It would be also nice to have possibility to add 'Flashlight switch' to the Lock Screen pulley menu (through Settings > Lock Screen options). And ideally, it should work properly even if device is locked which was problem with great Flashlight app previously (can't find it now on Jolla C) available in Store (you was unable to switch it off without unlocking the device).

edit retag flag offensive close delete

Comments

really you said it rightly. its more useful if placed on lock screen.

amitpatel ( 2016-08-01 19:59:32 +0200 )edit

1 Answer

Sort by » oldest newest most voted
9

answered 2016-08-01 21:17:47 +0200

g7 gravatar image

This can be easily accomplished with a custom quick action:

Create /usr/share/lipstick/quickactions/com.jolla.settings.system.flashlight.conf and put the following inside:

priority=90
icon=icon-m-flashlight
title=Toggle flashlight
translation-catalog=lipstick-jolla-home
remote-service="com.jolla.settings.system.flashlight"
remote-path="/com/jolla/settings/system/flashlight"
remote-interface="com.jolla.settings.system.flashlight"
remote-method="toggleFlashlight"

Save, then restart lipstick via utilities or with systemctl --user restart lipstick. You will then be able to add the flashlight in the Lock Screen pulley.

Running it since a few days and it works well for me.

edit flag offensive delete publish link more

Comments

1

Thanks. Works nicely even though official version would be nice. As a minor nuisance toggling the flashlight shows the unlocking keypad and you have to swipe back to lock screen to toggle again.

hetas ( 2016-08-01 22:04:25 +0200 )edit

Yes, "works well" is a bit subjective :) It works but also wakes up the phone. And the switch still suffers the old problem - the first activation after a reboot takes forever (more than a minute in my case). Still, better than nothing!

pichlo ( 2016-08-02 12:50:01 +0200 )edit
1

that's why I specified "for me" ;) That's exactly the same DBus call that the standard shortcut introduced in 2.0.2 invokes, so it has the same problems (on J1, on the Jolla C is pretty fast).

I tried to hook it directly on mce (double-press on power button) but unfortunately the service registers itself on the Session Bus while mce uses the System one -- so no dice.

g7 ( 2016-08-02 13:08:22 +0200 )edit

thanks, works for me as well ;) but as @hetas said, an official version would be nice

tad ( 2016-09-08 15:08:01 +0200 )edit
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2016-08-01 19:12:57 +0200

Seen: 588 times

Last updated: Aug 01 '16