Skip to content

Getting issue in fetching location when device screen is locked Android #580

@GurjeetLamba

Description

@GurjeetLamba

Your Environment

  • Plugin version:0.6.3

  • Platform: Android

  • OS version: 12

  • Device manufacturer and model: OPPO CPH2095

  • React Native version: 0.64

  • Plugin configuration options:
    BackgroundGeolocation.configure({
    desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
    stationaryRadius: 50,
    distanceFilter: 50,
    notificationTitle: 'Background tracking',
    notificationText: 'enabled',
    debug: true,
    startOnBoot: false,
    stopOnTerminate: true,
    locationProvider: BackgroundGeolocation.RAW_PROVIDER,
    interval:50000,
    fastestInterval: 50000,
    activitiesInterval: 50000,
    stopOnStillActivity: false,
    url: 'http://192.168.81.15:3000/location',
    httpHeaders: {
    'X-FOO': 'bar'
    },

    postTemplate: {
      lat: '@latitude',
      lon: '@longitude',
      foo: 'bar' // you can also add your own properties
    }
    

    });

Context

I am trying to get the location all the time , whether device locked or unlocked , app in foreground or background , I have taken the background Permissions also , but not getting correct location when device is locked. I am not using the url but calling the API after getting location

Steps to Reproduce

  1. open the app or close keep device screen lock 15 seconds and let the device lock itself
  2. location will not be saved in db

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions