cordova-plugin-geolocation
cordova-plugin-geolocation copied to clipboard
fix(android): issues 285
Platforms affected
android
Motivation and Context
workaround fix #285
According to W3C, request a position and acquire a position should processing in parallel. In result, timeout timer starts before application gets permission request result.
Description
Setup timer in JavaScript for Android. At first, I referenced iOS implementation but createTimeout didn't work as I thought. (When timeout, timeoutTimer in getCurrentPosition didn't be set null. This caused success callback and return current position after timeout error.) So, there is some deference.
Testing
Tested with simulator and sample application.
Checklist
- [ ] I've run the tests to see all new and existing tests pass
- [ ] I added automated test coverage as appropriate for this change
- [x] Commit is prefixed with
(platform)if this change only applies to one platform (e.g.(android)) - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
- [x] I've updated the documentation if necessary