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

Handle face tracking directly, without using ArFragment() #456

Open
PaulKlauser opened this issue Dec 27, 2023 · 0 comments
Open

Handle face tracking directly, without using ArFragment() #456

PaulKlauser opened this issue Dec 27, 2023 · 0 comments

Comments

@PaulKlauser
Copy link
Collaborator

Currently, face tracking is handled by adding an invisible Fragment that extends ArFragment and feeds face tracking updates to a shared ViewModel observed by MainActivity.

This works, and that Fragment handles things like permissions and Google Play services usage for us automatically, however that automatic handling has some drawbacks:

  • The app closes if permission is denied (we've hacked around this)
  • The app can't run without Google Play services (the app should still run, just without face tracking)
  • Older devices that don't support AR can't run the app at all (the app should still run, just without face tracking)
  • The shared ViewModel pattern is an opportunity for misdirection

Because of these drawbacks, let's use ArSceneView directly, like ArFragment does under the hood, or like this example - https://github.com/PaulKlauser/face-tracker-demo/blob/main/app/src/main/java/com/example/facetracker/MainActivity.kt (this example is in Compose, but the SceneView idea is the same)

We should approach this incrementally, with some sort of basic feature flag in place so that we can merge in the new code without breaking the existing functionality, and then switch over once it's all merged in. No big-bang-here's-all-of-the-functionality-at-once PRs please :)

@lauren-ahart lauren-ahart moved this to Ready to select in Vocable-Android May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready to select
Development

No branches or pull requests

1 participant