-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Change Motion API to use native heading/compass (i.e. "device orientation") #5327
Comments
There is an open PR that fixes the permissions issue with the web implementation here: #5317 |
@thomasvidas Couldn't ask for more 😅 |
No worries! 😄 |
In fact, we are considering using native code for the plugin as it seems that the web results are not as accurate as the native results |
I think the discussion in the mentioned issue on Cordova's plugin above is valuable here with the references + maybe the code itself can be used partially to create the native implementation (check my comment there). I use it for navigation feature in my app, and I prefer native implementation for better performance and permission flow which will result in better user experience overall. |
In the last week I experienced with Motion API and cordova-plugin-device-orientation as alternatives for getting compass-orientation, and sadly Motion-API is no good for me as alternative right now:
That's why I think Motion-API should implement native methods to get "devices compass", and even adopt the methods used in the old Cordova's plugin. My project info: BTW - Be aware that heading and compass used sometimes interchangeably to describe relative deviation from the magnetic north, while sometimes heading is used to to describe the vector of change in position relative to the north. I'm talking about implementing digital compass in my app and not the other kind of heading. |
As I said, we are considering using native implementation instead of web implementation and it's being tracked here, so please, don't reopen your issue, if you want to add additional information, add it there. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Feature Request
Description
As stated in the docs: "This plugin is currently implemented using Web APIs. Most browsers require permission before using this API". Unfortunately, since iOS 13+ the permission flow is very non-native and results in poor user experience. Native implementation will save the need for user interaction before asking for permission (one time only).
Hence, for better UX, Motion API should use native implemantation.
For more details and refrences see full discussion at cordova-plugin-device-orientation repo: "Should deprecation status be removed?"[Accepted] issue.
The text was updated successfully, but these errors were encountered: