UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    For devices with no Notification LED is it possible to use flashlight instead?

    Scheduled Pinned Locked Moved Fairphone 5
    7 Posts 3 Posters 184 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • S Offline
        sixwheeledbeast
        last edited by

        Would it be possible to have an option to trigger the flashlight as a subtle notification LED.
        Ideally as part of UT but open to other temporary solutions.

        ikozI 1 Reply Last reply Reply Quote 0
        • S Offline
          sixwheeledbeast
          last edited by

          Comparing with flashlight on and off.

          Off
          /sys/class/led/led:switch_0/brightness = 0
          /sys/class/led/led:torch_0/brightness = 0
          /sys/class/led/led:torch_3/brightness = 0

          On
          /sys/class/led/led:switch_0/brightness = 1
          /sys/class/led/led:torch_0/brightness = 127
          /sys/class/led/led:torch_3/brightness = 127

          I'll need to test if changing these will trigger the light, certainly just making switch_0 = 1 doesn't work.
          Not sure if this is the correct way to interface with these.

          As for monitoring for new messages I'm wondering if dbus-monitor could be used...

          S 1 Reply Last reply Reply Quote 1
          • ikozI Offline
            ikoz @sixwheeledbeast
            last edited by

            @sixwheeledbeast On android the screen is used as a notification led. It works better on amoled screen as only a little circle on the top (where the led used to be) is on, and the rest of the screen is off.

            May the source be with you

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sixwheeledbeast @ikoz
              last edited by

              This isn't a feature in Ubuntu Touch yet either is it?
              Would there be any burn in concerns using the screen?
              I certainly miss having a flicker of a notification led every few seconds for missed calls and messages.
              I didn't expect to miss a small feature so much on this device.

              ikozI 1 Reply Last reply Reply Quote 0
              • ikozI Offline
                ikoz @sixwheeledbeast
                last edited by

                @sixwheeledbeast

                This isn't a feature in Ubuntu Touch yet either is it?

                No, it isn't a feature of UT, at least not on any of my devices.

                I don't know of that feature is used in android of FP5 either. I have just seen it on another device and thought it is a better idea than using the flashlight.

                Would there be any burn in concerns using the screen?

                I don't think that it can cause significant burn-in to the screen as it is on very briefly. Also, while using the device that part of the screen is mostly black.

                May the source be with you

                KenedaK 1 Reply Last reply Reply Quote 0
                • KenedaK Online
                  Keneda @ikoz
                  last edited by

                  @ikoz
                  That's exactly what I expected to see with amoled smartphone and no led.
                  And for preventing burning problems, changing the pixels used every flash.

                  2015-2023 : Meizu MX4 ☠️⚰️✝️
                  2023-2024 : Nexus 5 ☠️⚰️✝️
                  2024-***** : FPOS Fairphone 5
                  🇲🇫🇬🇧

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sixwheeledbeast @sixwheeledbeast
                    last edited by

                    To progress further with the initial flashlight idea, controlling the flash directly appears to work fine in the following way.

                    #!/usr/bin/env bash
                    
                    flashOff() {
                    	printf '%s' "0" > /sys/class/leds/led:torch_0/brightness
                    	printf '%s' "0" > /sys/class/leds/led:switch_0/brightness
                    }
                    
                    flashOn() { # 2 appears to be the minimum brightness value possible
                    	printf '%s' "2" > /sys/class/leds/led:torch_0/brightness
                    	printf '%s' "1" > /sys/class/leds/led:switch_0/brightness
                    }
                    

                    So with a loop I can have a nice flashing pattern at the minimum brightness.
                    Just need to find what to hook into so I can have it only running only while there is a green notifications icon.

                    As for using the screen, I think the green envelope icon, possibly slowly moving along the top edge of the screen (to minimise any burn in); would be a nice option there.

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post