thunkable / thunkable-issues

24 stars 9 forks source link

Taptic Engine Support #481

Open lukerichards0n opened 4 years ago

lukerichards0n commented 4 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Which platform are you asking for? Thunkable Classic (app.thunkable.com) or Thunkable ✕ (x.thunkable.com)

Additional context Add any other context or screenshots about the feature request here.

Taptic Engine support on iOS devices would be a great feature in thunkable x for providing additional user feedback. An example of use: The Taptic Engine is triggered on a value change of a slider, so there is feedback with each step of the slider.

Current alternative is simply to use the vibration feature, but the vibration lasts far to long to be used in a manner as described above.

eoinparkinson commented 4 years ago

I too would like to see this feature, but to be cross platform. Many newer Android devices support haptic feedback. The vibrate feels outdated, especially when using apps on your phone that use haptic feedback, like Spotify when you add a song to your likes etc. I am unsure if this is possible considering Thunkable uses a cross platform language, but it'd be great to have any information on this

Thanks, Eoin.

josmas commented 4 years ago

There are a few ways to look at this, although the most important question would be how important this feature is considering other work that we need to do.

Vibrate is rather flexible on Android, but not at all on iOS. We could change the block to receive a pattern, basically a list of numbers which on Android would mean a series of pause and vibration actions. For instance [1000,2000,1000,1000] would mean wait 1 sec, vibrate for 2 secs, wait 1 sec, vibrate for 1 sec. Unfortunately, although iOS would also accept this input, the numbers would mean just pauses while the vibration will always be roughly 400ms. So wait 1 sec, vibrate 400ms, wait 2 secs, vibrate 400ms, and so forth. So that, from a cross platform point of view is messy to say the least.

There are some libraries for haptics (which in reality they use the haptics api for iOS and fake it by using vibrate patterns for Android). The question here is, do we create independent blocks to control the feedback (you, as developers, are in control of what happens by explicitly placing blocks) OR we bake into some of the components, such as the silder example above. So the latter would be a property in the slider component as opposed to a set of blocks (or a Haptics invisible component). Happy to hear your thoughts.

eoinparkinson commented 4 years ago

Both are great ideas. I've been using Thunkable for a while now, and I personally like to have the ability to customise things as much as possible, that's just me. So from my perspective, the ability to add blocks and create custom haptics would be cool. Your idea of adding waits and triggers sounds good, and maybe the numbers could be arranged to signal different strengths of feedback too?

On the other hand, which I believe is suited for a lot of Thunkers, is adding the component and setting the properties to be of a certain feedback level (light, medium, strong) just like you'd get in iOS settings. Maybe the block would have an input for number of pulses? Or the block could have a drop down to say pulse strength, which would be the same drop down like you'd get when changing the api block from get to post etc.

Again this is only my view on this.

Thanks, Eoin.

ShtokyD commented 2 years ago

Absolutely, would also like to see this feature!