react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

[Android] getLocations return empty array

Open arochedy opened this issue 4 years ago • 1 comments

Your Environment

  • Plugin version: 0.6.3
  • Platform: Android
  • OS version:
  • Device manufacturer and model:
  • Running in Simulator:
  • React Native version:
  • Plugin configuration options:
  • Link to your project:

Context

On compenentDidmount I do

   BackgroundGeolocation.getLocations((locations) => {
        console.log('allLocations', locations);
        alert(JSON.stringify(locations));
      },(error) =>{
        alert('error')
      }

      );

Expected Behavior

Get alllocations store by the plugin

Actual Behavior

I get an empty array :(

Possible Fix

Steps to Reproduce

Context

It's work on iOs but not an android (simulator and real device)

Debug logs

arochedy avatar Nov 27 '20 13:11 arochedy

I've had this problem, too,How did you solve it?

wy10 avatar Aug 06 '21 14:08 wy10