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

RMET-3770 ::: Android native library + bridges #3

Merged
merged 81 commits into from
Jan 6, 2025

Conversation

OS-pedrogustavobilro
Copy link

@OS-pedrogustavobilro OS-pedrogustavobilro commented Dec 27, 2024

Notes

This PR should only be merged after #1. As such, it contains changes that are also present on that PR, that will not appear once that one is merged.

Still missing:

  • manual testing Capacitor plugin / sample app - Was done in a different branch
  • Aligning on errors with iOS
  • CI and Sonarqube

Description

Add Geolocation native Android code to the android-lib package. Contains the Kotlin source files and unit tests.

Also contains the Android code for the cordova and capacitor plugins, which have the following changes, fixing some issues on behaviours on Android:

Cordova changes

  1. getLocation - renamed to getCurrentPosition

    • added usage of maximumAge in native Android code, used in setMaxUpdateAgeMillis (this one doesn't really make a huge difference as it is being used in Javascript as well).
  2. addWatch - renamed to watchPosition

    • maximumAge not used as interval anymore; used as maximum age actually with setMaxUpdateAgeMillis, and timeout is used as interval.

Capacitor changes

  1. getCurrentPosition

    • timeout is now used in retrieving the current location (i.e. if no location is retrieved until timeout, an error is returned.
  2. watchPosition

    • the timeout parameter is no passed in the interval field (as opposed to setMaxUpdateDelayMillis which mostly just regulated batching), instead of being hardcoded 10 seconds.
    • added maximumAge through setMaxUpdateAgeMillis
  3. clearWatch

    • fix: clearing one watch now does not remove location updates from the other watches.

Type of changes

  • Fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Refactor (cosmetic changes)
  • Breaking change (change that would cause existing functionality to not work as expected)

Platforms affected

  • Android
  • iOS
  • JavaScript

Checklist

  • Pull request title follows the format RNMT-XXXX <title>
  • Code follows code style of this project
  • CHANGELOG.md file is correctly updated
  • Changes require an update to the documentation
    • Documentation has been updated accordingly

alexgerardojacinto and others added 30 commits December 16, 2024 17:49
…utsystems-geolocation into feat/RMET-3904/get-location
…utsystems-geolocation into feat/RMET-3904/get-location

# Conflicts:
#	plugin.xml
@alexgerardojacinto alexgerardojacinto removed their request for review January 2, 2025 15:51
@alexgerardojacinto alexgerardojacinto force-pushed the feat/RMET-3904/get-location branch from d74a72d to 50cdf3d Compare January 3, 2025 11:29
…cation

# Conflicts:
#	packages/cordova-plugin/dist/plugin.cjs
#	packages/cordova-plugin/dist/plugin.js
#	packages/cordova-plugin/dist/plugin.mjs
#	packages/cordova-plugin/src/web.ts
@OS-martacarlos OS-martacarlos force-pushed the feat/RMET-3904/get-location branch from 72a4630 to 1ce430b Compare January 6, 2025 16:19
@alexgerardojacinto alexgerardojacinto merged commit 8c7493c into development Jan 6, 2025
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

Successfully merging this pull request may close these issues.

5 participants