Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Shorter delay after single click

    Developers
    2
    4
    3253
    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.
    • yuvalshu
      yuvalshu last edited by

      Hi,
      Im developing an app with the Flic SDK that will require short term intensive clicking on the button. It works fine, but our main issue now is the delay it takes to identify a single click (our app listens to all 3 states). Your documentation states 500ms wait after click before confirming a single click, is there anyway to shorten this? something like 200ms.

      Thanks!

      anton 1 Reply Last reply Reply Quote 0
      • anton
        anton FlicTeam @yuvalshu last edited by

        @yuvalshu No, the 500 ms delay can not be changed. If you want something else then you would have to implement your own logic to distinguish between click/doubleClick/hold using the raw down/up events.

        1 Reply Last reply Reply Quote 0
        • yuvalshu
          yuvalshu last edited by

          @anton thanks Anton, problem is I still need to distinguish between click, doubleclick and hold and listening to the buttonDown event means I'll need to implement the logic behind deciding what type of action it is.

          Regarding lower latency mode, I'm developing for Android and couldn't find the equivalent configuration in the Android SDK.

          So the 500ms delay is not something I can override somewhere?

          anton 1 Reply Last reply Reply Quote 0
          • anton
            anton FlicTeam @yuvalshu last edited by

            @yuvalshu Yes this can be achieved. Instead of listening for the buttonClick event you should instead listen for the buttonDown event. The down event is sent directly when the physical button is pushed down. I don't know if you are implementing this on iOS or Android, but have a look at flicButton:didRecieveButtonDown: for iOS and onButtonUpOrDown() for Android. Of course, if Android, then you also have to register the correct FlicButtonCallbackFlags.

            Also, in case you don't already know this, you can decrease the event latency by setting a lower latency mode through the SDK.

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