Flashlight For Jolla Sailfish OS

Flashlight icon 86x86

Artem’s and Ekaterina’s first project for Jolla Sailfish OS

Main screen Cover page

Flashlight is something every platform needs, unfortunately officially it is not really possible for Sailfish OS (LED is not supported in Qt Multimedia, gstreamer is not in the list of allowed libraries for public use).

With the help of many great people on IRC and mailing list we went through the following steps.

Versions

* Coming future
– Turn screensaver off while Flashlight is active
– Power control whenever API for it is ready or when I figure how to do it in GStreamer (share pointers in the comments if you can)

* Version 3.2, coming in Aug 2026 (under Jolla Harbour QA at the moment)
App is available in the app store again (more strict verification requirements pushed it put of app store for a while). Also there are now icons for the more resolutions.

* Version 3.1, Mar 2014
Flashlight now works even when other apps are active and even when Camera app wants to request LED as well. Flashlight naturally releases it and grabs back when Camera goes to background.

* Version 3.0, Feb 2014
After lots of experiments eventually we managed to bundle in the whole Jolla permission system and using light while in the task manager is eventually possible! We still have to stop flashlight when you go into another apps due to annoying Sailsfish bug causing whole device reboot sometimes. Go vote for fixing it! The more votes it gets, the more chances it will actually be fixed

* Version 2.3, Jan 2014 Proper GStreamer use
We managed to bundle whole GStreamer to the app and starting light became much faster as we didn’t need to wait until a separate process launch. Also became more reliable.

* Version 2.1, Jan 2014 No public tracking
Public didn’t like the fact that we were tracking user activity (using this Mixpanel project of mine) and it also was causing internet connection start – something flashlight shouldn’t really require, so we disabled it

* Version 2.0, Dec 2014 gst-launch
Jolla firmware update enabled LED for GStreamer (not at Qt Mulimedia level yet), yet using gstreamer isn’t really easy given Jolla Harbour constraints on allowed libraries. So we used the simplest possible way and were just.. launching and stopping get-launch process behind the scenes. With careful handling it was working quite well

* Version 1.1, Dec 2014 Strobing Light
We used a crazy trick of making camera focus and re-focus all the time. With properly tuned time constraints it was strobing so that it almost looked like a stable light

What do you think?

Got questions, feedback, opinions?
Tell in the comments what you like, don’t like and how to improve the app.

  • Kaacz

    Simply – Jolla lack of decisions is tragedy .. 🙁

    • artemmarchenko

      Well, in Flashlight case decisions were quite clear: LED control is coming to Qt Multimedia, meanwhile you can use it from GStreamer (since 2nd firmware update I think), but you have to bundle it all with your app. And you should care about resource permissions “as in MeeGo” too 🙂 Too bad trying to share resources with Camera tends to crash the whole device – hope they’ll fix it

  • Anz

    how about adding an option in the pully menu like “LED on launch: OFF”

    • artemmarchenko

      Technically it’s easy, @disqus_KAnqOwHkjz:disqus, but.. what would it be useful for? I can hardly imagine a situation when you would start a flashlight without wanting it to start light ASAP. In fact I am thinking about starting whole flashlight app on a long volume key press (should be quite difficult, but might be possible).

  • TylerTemp

    May I translate it into Chinese? If so, where can I get the source code & submit the translated package?

    • artemmarchenko

      Thanks for the offer, Tyler. Unfortunately I don’t know much about the translation practices in Qt and I am busy with non-Jolla projects for now. That might change in the future. Source code is not public unfortunately.

  • Skillmon

    Would be cool if it could translate some text input to morse code.

Beautiful apps for Jolla Sailfish OS and beyond