Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 291 forks source link

Add location extras support #270

Closed tonygomez closed 10 months ago

tonygomez commented 3 years ago

Android

Add support for retrieving extra provider additional information. Reference: https://developer.android.com/reference/android/location/Location#getExtras()

Test Tested using a Trimble R10 GPS receiver and Trimble mobile manager mock location

Agontuk commented 3 years ago

Thanks for the PR! Just a few observations

  1. You don't need custom putIntoMap function. Arguments class provides a super helpful fromBundle method which you can use to convert Bundle to WritableMap.
  2. It would be better to rename extras key with a more meaningful word. Since the android doc says it provides Provider specific information, so providerInfo should do the job I think.
  3. Please add it to the typings.