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

Broken example on Android #3

Closed
sebastianbuechler opened this issue Jul 26, 2022 · 4 comments
Closed

Broken example on Android #3

sebastianbuechler opened this issue Jul 26, 2022 · 4 comments

Comments

@sebastianbuechler
Copy link
Contributor

The current main a has a broken example because of some recent changes (the new Motion.elevated constructor and undefined hitTestBehavior parameter in MouseRegion).

However, when fixing them I also get a general error while running with Flutter 2.10.5:

This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects  

And additionally:

The detected reason was:

  No `...\motion\example\android\AndroidManifest.xml` file

Is it possible that the example was only tested for iOS?

@mrcendre
Copy link
Owner

Thanks for the PR @sebastianbuechler !

You are right, the plugin has not been thoroughly tested on Android. It is my understanding that the gyroscope's events sample rate is much lower on Android, which makes it hard to achieve a smooth effect. I'm currently investigating the option to add interstitial events to trigger more frames using linear interpolation.

As for the example app, at the moment, contributors and plugin users are responsible for properly enabling their platform of choice. "Flutter embedding" warnings are really not something to worry about in sample apps, as long as the app that depends on the plugin uses the latest version of Flutter embedding.

@sebastianbuechler
Copy link
Contributor Author

@mrcendre That was exactly the reason why I wanted to test the example of your package. I used the plugin on our project and did not get a smooth experience on Android. In fact, it even lagged for multiple seconds after a bit. Not sure if this helps, but another package for sensor access provides updates on android in 60 fps: zesage/motion_sensors@c14e6a6

For the example app, it was not just a warning but an error. So I could not run it on my system for reproduction.

@mrcendre
Copy link
Owner

Not sure if this helps, but another package for sensor access provides updates on android in 60 fps: zesage/motion_sensors@c14e6a6

@sebastianbuechler I will definitely check it out, thanks !

For the example app, it was not just a warning but an error. So I could not run it on my system for reproduction.

Unfortunately, at the time, no platform is enabled by default for the example app. In other words, users are responsible for properly setting up the example app for their platforms (the AndroidManifest.xml on Android, etc.).

A shorthand for creating the Android project : cd example then flutter create --platforms=android ..

@sebastianbuechler
Copy link
Contributor Author

Not sure if this helps, but another package for sensor access provides updates on android in 60 fps: zesage/motion_sensors@c14e6a6

@sebastianbuechler I will definitely check it out, thanks !

For the example app, it was not just a warning but an error. So I could not run it on my system for reproduction.

Unfortunately, at the time, no platform is enabled by default for the example app. In other words, users are responsible for properly setting up the example app for their platforms (the AndroidManifest.xml on Android, etc.).

A shorthand for creating the Android project : cd example then flutter create --platforms=android ..

Thanks for the information. Nice package you built, hope that we can use it even on android in the future!

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

No branches or pull requests

2 participants