mauron85 / react-native-background-geolocation

Background and foreground geolocation plugin for React Native. Tracks user when app is running in background.
Apache License 2.0
1.33k stars 561 forks source link

How to override native handlers? #493

Closed enesozturk closed 3 years ago

enesozturk commented 4 years ago

Hi! Thanks for such a good library. I am trying to override location handlers in native side. I tried to use methods that you gave in Readme as following. What should I import to use BackgroundGeolocationFacade? Xcode says "Use of undeclared identifier 'BackgroundGeolocationFacade'"

BackgroundGeolocationFacade.locationTransform = ^(MAURLocation * location) {
  // Modify the location
  location.latitude = @(location.latitude.doubleValue + 0.018);

  // Return modified location
  return location;

  // You could return null to reject the location,
  // or if you did something else with the location and the library should not post or save it.
};

For the android side as well. Could you please explain more details for this part.

Thanks in advance

Your Environment

Context

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.