Closed sebastianbuechler closed 2 years ago
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.
@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: https://github.com/zesage/motion_sensors/commit/c14e6a60f0543d2be9ec4a923ae0f75b1097244d
For the example app, it was not just a warning but an error. So I could not run it on my system for reproduction.
Not sure if this helps, but another package for sensor access provides updates on android in 60 fps: https://github.com/zesage/motion_sensors/commit/c14e6a60f0543d2be9ec4a923ae0f75b1097244d
@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 .
.
Not sure if this helps, but another package for sensor access provides updates on android in 60 fps: https://github.com/zesage/motion_sensors/commit/c14e6a60f0543d2be9ec4a923ae0f75b1097244d
@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
thenflutter create --platforms=android .
.
Thanks for the information. Nice package you built, hope that we can use it even on android in the future!
The current main a has a broken example because of some recent changes (the new
Motion.elevated
constructor and undefinedhitTestBehavior
parameter inMouseRegion
).However, when fixing them I also get a general error while running with Flutter 2.10.5:
And additionally:
Is it possible that the example was only tested for iOS?