Shorter delay after single click

  • 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.


  • FlicTeam

    @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.

  • @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?

  • FlicTeam

    @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.

Log in to reply