Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tvOS] Touch gestures or events need improvement #11

Open
joshtynjala opened this issue Jul 25, 2017 · 7 comments
Open

[tvOS] Touch gestures or events need improvement #11

joshtynjala opened this issue Jul 25, 2017 · 7 comments

Comments

@joshtynjala
Copy link

joshtynjala commented Jul 25, 2017

Tracker URL: https://tracker.adobe.com/#/view/AIR-4198411
AIR Version: 26.0.0.118
Platform: tvOS

Some observations based on the touch/gesture options listed in the release notes for tvOS:

TransformGestureEvent.GESTURE_SWIPE - Swipe Events are now supported on Apple TV similar to other platforms. However, the values of stageX and stageY properties remain fixed as received from the native operating system, which is the center of the screen. AIR developers can read a new velocity property in Swipe Events to manage the fast movements based on the strength of swipe.

In native apps on tvOS, if you change direction between touch begin and end, it can pass focus in both directions. In other words, if you were moving the touch from left to right, it will pass focus from left to right, but if you start moving the same touch from right to left without ending it first, it will start passing focus from right to left instead. AIR does not dispatch TransformGestureEvent.GESTURE_SWIPE again if a touch changes direction. Maybe it should? If not, then another gesture or raw touch events need to provide the data that would be needed to recreate the native behavior.

Touch Events are generated on Siri Remote Touch when Multitouch.inputMode is set to TOUCH_POINT.

This allows me to listen for TouchEvent.TOUCH_MOVE, which gives me some good information about the touches. The localX, localY, stageX, and stageY properties change when I touch the Siri remote and move my finger around. It's a little more work than using a gesture, but this would allow me to simulate the native focus change behavior manually.

However, I discovered that the localX, localY, stageX and stageY properties are only within the range of -1920 to 1920 horizontally and -1080 to 1080 vertically. In other words, if my touch is moving from left to right, and the stageX value reaches 1920, continuing to move my touch from left to right will not change the value of stageX anymore. It will remain at the maximum value of 1920. If I wanted to write some code that manually detects some kind of swipe/pan gesture based on the position of the touch (instead of using the gesture event mentioned earlier), it would fail if the current touch position is near any of these limits. Is it AIR or tvOS that is creating this restriction? If it's AIR that is artificially limiting these values, I think that should be reconsidered.

@PrimaryFeather
Copy link
Contributor

PrimaryFeather commented Jul 26, 2017

I'm with Josh! tvOS apps built with AIR must feel like native apps when it comes to touch input. Please make this possible by fixing / re-evaluating these points.

@joshtynjala
Copy link
Author

Adobe Tracker won't let me comment on the issue, so I'll add my comment here.

I think that TransformGestureEvent.GESTURE_DIRECTIONAL_TAP should also be dispatched when Multitouch.inputMode is set to TOUCH_POINT. Currently, it's only dispatched when Multitouch.inputMode is set to GESTURE. It's possible to manually detect other gestures using raw TouchEvents, if necessary. GESTURE_DIRECTIONAL_TAP is different than the others because it's based on touching the edge of the Apple TV remote's touch surface. Raw TouchEvents don't expose enough information to know that a touch happened on the edge. That makes it impossible to detect this gesture when Multitouch.inputMode is set to TOUCH_POINT, but it's a very important core gesture of tvOS.

@dannycortesv
Copy link

dannycortesv commented Jul 13, 2018

I thought this was solved on current Air version, but still the same...

@dannycortesv
Copy link

@PrimaryFeather @joshtynjala do you guys know if Adobe is planning a fix for this? I think Apple TV support is a great plus for AIR, swipe gesture the most important ui interaction for this plattform.

@joshtynjala
Copy link
Author

I believe that it's unlikely that Adobe will do anything to further improve tvOS support.

@dannycortesv
Copy link

dannycortesv commented Aug 9, 2018

You can use now this extension from Distriqt: https://github.com/distriqt/ANE-SystemGestures/wiki/u.Native-Gesture-Events, It supports all tvOS events

@joshtynjala
Copy link
Author

It's worth pointing out this detail from the AIR 32 release notes, which indicates that Adobe does not consider tvOS a high-priority platform:

AIR tvOS Support Moved to Labs
To help focus our testing on the most popular platforms, we've decided to move tvOS support back to the AIR beta channel. The functionality remains the same and developers can download the latest SDK over at https://labs.adobe.com

Source: https://helpx.adobe.com/flash-player/release-note/fp_32_air_32_release_notes.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants