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

Synthesize gesture events in hybrid mode on Android #58837

Closed
blasten opened this issue Jun 5, 2020 · 5 comments
Closed

Synthesize gesture events in hybrid mode on Android #58837

blasten opened this issue Jun 5, 2020 · 5 comments
Assignees
Labels
a: platform-views Embedding Android/iOS views in Flutter apps customer: product engine flutter/engine repository. See also e: labels. P0 Critical issues such as a build break or regression platform-android Android applications specifically

Comments

@blasten
Copy link

blasten commented Jun 5, 2020

This is required to forward events to an android.view.View after the framework has decided that the platform view owns the events.

The logic used in virtual displays can be reused to achieve this behavior in hybrid mode. Currently, this involves sending a message over a platform channel to the framework with the event metadata, then the framework forwards the event back to the platform. Finally, the embedding replays the event in the target Android view.

@blasten blasten added the engine flutter/engine repository. See also e: labels. label Jun 5, 2020
@zanderso zanderso added a: platform-views Embedding Android/iOS views in Flutter apps customer: product P1 platform-android Android applications specifically labels Jun 19, 2020
@chinmaygarde
Copy link
Member

@iskakaushik has context on the relevant subsystem and has agreed to investigate but will have limited availability this week.

@chinmaygarde
Copy link
Member

I believe flutter/engine#19484 is related to this effort. @iskakaushik Is that correct?

@iskakaushik
Copy link
Contributor

@chinmaygarde yup. I've landed flutter/engine#19427 and flutter/engine#19482 which lay the ground work. flutter/engine#19484 and adding tests should help us close this issue.

iskakaushik pushed a commit to iskakaushik/engine that referenced this issue Jul 6, 2020
This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in flutter/flutter#60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: flutter/flutter#58837
iskakaushik pushed a commit to iskakaushik/engine that referenced this issue Jul 7, 2020
This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in flutter/flutter#60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: flutter/flutter#58837
iskakaushik added a commit to flutter/engine that referenced this issue Jul 7, 2020
This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in flutter/flutter#60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: flutter/flutter#58837
@iskakaushik
Copy link
Contributor

fixed in #60930

justinmc pushed a commit to justinmc/engine that referenced this issue Jul 7, 2020
)

This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in flutter/flutter#60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: flutter/flutter#58837
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2021
@flutter-triage-bot flutter-triage-bot bot added the P0 Critical issues such as a build break or regression label Jun 28, 2023
@flutter-triage-bot flutter-triage-bot bot removed the P1 label Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: platform-views Embedding Android/iOS views in Flutter apps customer: product engine flutter/engine repository. See also e: labels. P0 Critical issues such as a build break or regression platform-android Android applications specifically
Projects
None yet
Development

No branches or pull requests

5 participants