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

GEOFENCE_NOT_AVAILABLE in Android huawei device

Open hasan642 opened this issue 2 years ago • 13 comments

Your Environment

  • Plugin version: ^4.14.2
  • Platform: iOS or Android: Android Huwaui
  • OS version: Android 10
  • Device manufacturer / model: JNY-LX1
  • React Native version (react-native -v): 0.71.8
  • Plugin config
      reset: true,
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      distanceFilter: 10,
      stopTimeout,
      debug, // to hear sounds for background-geolocation life-cycle.
      logLevel,
      stopOnTerminate: false,
      startOnBoot: true,
      enableHeadless: true,
      geofenceInitialTriggerEntry: true,
      preventSuspend: false,
      geofenceModeHighAccuracy: true,
      logMaxDays: 0,
      allowIdenticalLocations: false,
      notification: {
        title: translate('common.geofencingTitle'),
        text: translate('common.geofencingMessage'),
      },
      persistMode: BackgroundGeolocation.PERSIST_MODE_GEOFENCE,
      maxDaysToPersist: 0,
      maxRecordsToPersist: 0,
      disableLocationAuthorizationAlert: true,
      backgroundPermissionRationale: {
        message: 'ZenHR collect your location in background to enable auto-clocking feature',
      },

Expected Behavior

I'm currently using the plugin for an Android Huawei device. I've added a license for Huawei, but I haven't used a valid key since I'm in a DEBUG build. While I can fetch the location successfully, geofencing doesn't seem to work.

Error Received: ⚠️ Failed to start monitoring geofences: null 10200 GEOFENCE_NOT_AVAILABLE

there is a need for a valid key in debug builds?

Actual Behavior

an error received: ⚠️ Failed to start monitoring geofences: null 10200 GEOFENCE_NOT_AVAILABLE

Steps to Reproduce

  1. just try to use geofencing in the Huwaui JNY-LX1 device and observe

Context

I'm trying to hit an API when user enters or exist the geofencing (even when app is killed)

Debug logs

Logs
10-15 14:07:17.236 26914 28518 E TSLocationManager:
10-15 14:07:17.236 26914 28518 E TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:17.236 26914 28518 E TSLocationManager: ║ LICENSE VALIDATION FAILURE: com.zenhr
10-15 14:07:17.236 26914 28518 E TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:17.236 26914 28518 E TSLocationManager: ╟─ Invalid license key: YOUR_HMS_LICENCE_KEY_HERE
10-15 14:07:17.236 26914 28518 E TSLocationManager: ╟─ BackgroundGeolocation is fully functional in DEBUG builds without a license so you can 'try before you buy'.
10-15 14:07:17.236 26914 28518 E TSLocationManager: ╚═════════════════════════════════════════════
10-15 14:07:17.275 26914 28528 I TSLocationManager: [c.t.l.logger.LoggerFacade$a a]
10-15 14:07:17.275 26914 28528 I TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:17.275 26914 28528 I TSLocationManager: ║ TSLocationManager version: 3.5.1 (430)
10-15 14:07:17.275 26914 28528 I TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:17.275 26914 28528 I TSLocationManager: ╟─ HUAWEI JNY-LX1 @ 10 (react)
10-15 14:07:17.275 26914 28528 I TSLocationManager: ╟─ HMS: true
10-15 14:07:17.275 26914 28528 I TSLocationManager: {
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "activityRecognitionInterval": 10000,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "allowIdenticalLocations": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "authorization": {},
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "autoSync": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "autoSyncThreshold": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "backgroundPermissionRationale": {
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "title": "Allow {applicationName} to access this device's location even when closed or not in use?",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "message": "ZenHR collect your location in background to enable auto-clocking feature",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "negativeAction": ""
10-15 14:07:17.275 26914 28528 I TSLocationManager:   },
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "batchSync": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "configUrl": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "debug": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "deferTime": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "desiredAccuracy": -1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "desiredOdometerAccuracy": 100,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "disableAutoSyncOnCellular": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "disableElasticity": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "disableLocationAuthorizationAlert": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "disableMotionActivityUpdates": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "disableProviderChangeRecord": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "disableStopDetection": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "distanceFilter": 10,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "elasticityMultiplier": 1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "enableHeadless": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "enableTimestampMeta": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "extras": {},
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "fastestLocationUpdateInterval": -1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "foregroundService": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "geofenceInitialTriggerEntry": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "geofenceModeHighAccuracy": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "geofenceProximityRadius": 1000,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "geofenceTemplate": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "headers": {},
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "heartbeatInterval": -1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "httpRootProperty": "location",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "httpTimeout": 60000,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "isMoving": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "locationAuthorizationRequest": "Always",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "locationTemplate": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "locationTimeout": 60,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "locationUpdateInterval": 1000,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "locationsOrderDirection": "ASC",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "logLevel": 5,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "logMaxDays": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "maxBatchSize": -1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "maxDaysToPersist": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "maxMonitoredGeofences": 97,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "maxRecordsToPersist": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "method": "POST",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "minimumActivityRecognitionConfidence": 75,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "motionTriggerDelay": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "notification": {
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "layout": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "title": "Geofence Time-Tracking",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "text": "Your work location is currently being monitored for attendance purposes.",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "color": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "channelName": "TSLocationManager",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "channelId": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "smallIcon": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "largeIcon": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "priority": -1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "sticky": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "strings": {},
10-15 14:07:17.275 26914 28528 I TSLocationManager:     "actions": []
10-15 14:07:17.275 26914 28528 I TSLocationManager:   },
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "params": {},
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "persist": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "persistMode": -1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "schedule": [],
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "scheduleUseAlarmManager": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "speedJumpFilter": 300,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "startOnBoot": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "stationaryRadius": 25,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "stopAfterElapsedMinutes": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "stopOnStationary": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "stopOnTerminate": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "stopTimeout": 15,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "url": "",
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "useSignificantChangesOnly": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "enabled": true,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "schedulerEnabled": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "trackingMode": 1,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "odometer": 0,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "isFirstBoot": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "didLaunchInBackground": false,
10-15 14:07:17.275 26914 28528 I TSLocationManager:   "didDeviceReboot": false
10-15 14:07:17.275 26914 28528 I TSLocationManager: }
10-15 14:07:17.276 26914 28528 I TSLocationManager: [c.t.l.logger.LoggerFacade$a a]
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:17.276 26914 28528 I TSLocationManager: ║ DEVICE SENSORS
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╟─ ✅  ACCELEROMETER: {Sensor name="accelerometer-lis3dh", vendor="st", version=1, type=1, maxRange=78.4532, resolution=9.576806E-6, power=0.23, minDelay=5000}
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╟─ ⚠️  GYROSCOPE:  none.  Motion-detection system performance will be degraded
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╟─ ✅  MAGNETOMETER: {Sensor name="mag-akm09918", vendor="akm", version=1, type=2, maxRange=2000.0, resolution=0.0625, power=6.8, minDelay=10000}
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="significant Motion", vendor="huawei", version=1, type=17, maxRange=2.14748365E9, resolution=1.0, power=0.23, minDelay=-1}
10-15 14:07:17.276 26914 28528 I TSLocationManager: ╚═════════════════════════════════════════════
10-15 14:07:17.524 26914 26914 D TSLocationManager: [c.t.l.l.LifecycleManager onCreate] ☯️  onCreate
10-15 14:07:17.524 26914 26914 D TSLocationManager: [c.t.l.l.LifecycleManager onStart] ☯️  onStart
10-15 14:07:17.525 26914 26914 D TSLocationManager: [c.t.l.l.LifecycleManager onResume] ☯️  onResume
10-15 14:07:17.525 26914 26914 I TSLocationManager: [c.t.l.a.BackgroundGeolocation <init>]
10-15 14:07:17.525 26914 26914 I TSLocationManager:   ✅  HMS: connected (version code:30000100)
10-15 14:07:17.534 26914 28528 D TSLocationManager: [c.t.l.l.TSLocationManager b]
10-15 14:07:17.534 26914 28528 D TSLocationManager:   ℹ️  Load last odometer location: Location[TSLocationManager 32******,36****** hAcc=27 t=?!? et=?!? vAcc=??? sAcc=??? bAcc=??? {Bundle[{odometer=0.0}]}]
10-15 14:07:17.534 26914 26914 D TSLocationManager: [c.t.l.http.HttpService startMonitoringConnectivityChanges]
10-15 14:07:17.534 26914 26914 D TSLocationManager:   🎾  Start monitoring connectivity changes
10-15 14:07:17.552 26914 26914 I TSLocationManager: [c.t.l.p.TSProviderManager startMonitoring]
10-15 14:07:17.552 26914 26914 I TSLocationManager:   🎾  Start monitoring location-provider changes
10-15 14:07:17.554 26914 28519 D TSLocationManager: [c.t.l.http.HttpService a]
10-15 14:07:17.554 26914 28519 D TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:17.554 26914 28519 D TSLocationManager: ║ 📶  Connectivity change: connected? true
10-15 14:07:17.554 26914 28519 D TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:17.574 26914 28528 D TSLocationManager: [c.t.l.d.s.SQLiteLocationDAO prune]
10-15 14:07:17.574 26914 28528 D TSLocationManager:   ℹ️  PRUNE -0 days
10-15 14:07:26.582 26914 28535 D TSLocationManager: [c.t.l.adapter.TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.message, debug, desiredAccuracy, disableLocationAuthorizationAlert, enableHeadless, geofenceModeHighAccuracy, headlessJobService, logLevel, logMaxDays, maxDaysToPersist, maxRecordsToPersist, notification, notification.title, notification.text, persistMode, startOnBoot, stopOnTerminate, stopTimeout]
10-15 14:07:26.585 26914 28535 D TSLocationManager: [c.t.l.u.LocationAuthorization withBackgroundPermission]
10-15 14:07:26.585 26914 28535 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
10-15 14:07:26.597 26914 28530 I TSLocationManager: - Enable: true → true, trackingMode: 1
10-15 14:07:26.602 26914 28530 I TSLocationManager: [c.t.l.g.TSGeofenceManager start]
10-15 14:07:26.602 26914 28530 I TSLocationManager:   🎾  Start monitoring geofences
10-15 14:07:26.605 26914 28530 D TSLocationManager: [c.t.l.http.HttpService startMonitoringConnectivityChanges]
10-15 14:07:26.605 26914 28530 D TSLocationManager:   🎾  Start monitoring connectivity changes
10-15 14:07:26.606 26914 28530 D TSLocationManager: [c.t.l.device.DeviceSettings startMonitoringPowerSaveChanges]
10-15 14:07:26.606 26914 28530 D TSLocationManager:   🎾  Start monitoring powersave changes
10-15 14:07:26.609 26914 28530 I TSLocationManager: [c.t.l.s.ActivityRecognitionService start]
10-15 14:07:26.609 26914 28530 I TSLocationManager:   🎾  Start motion-activity updates
10-15 14:07:26.658 26914 28530 I TSLocationManager: [c.t.l.service.HeartbeatService stop]
10-15 14:07:26.658 26914 28530 I TSLocationManager:   🔴  Stop heartbeat
10-15 14:07:26.734 26914 26914 I TSLocationManager: [c.t.l.l.TSLocationManager a]
10-15 14:07:26.734 26914 26914 I TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:26.734 26914 26914 I TSLocationManager: ║ motionchange LocationResult: 1 (11902ms old)
10-15 14:07:26.734 26914 26914 I TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:26.734 26914 26914 I TSLocationManager: ╟─ 📍  Location[network 32******,36****** hAcc=27 et=+2h21m10s202ms alt=0.0 vel=0.0 bear=0.0 vAcc=0 sAcc=0 bAcc=0 {Bundle[{battery_level=0.4, is_charging=true, odometer=0.0}]}], time: 1697368034830
10-15 14:07:26.748 26914 26914 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
10-15 14:07:26.748 26914 26914 I TSLocationManager:   🔵  Acquired motionchange position, isMoving: false
10-15 14:07:26.748 26914 26914 D TSLocationManager: [c.t.l.l.TSLocationManager a] Median accuracy: 26.563784
10-15 14:07:26.788 26914 26914 D TSLocationManager: [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion]
10-15 14:07:26.788 26914 26914 D TSLocationManager:   🎾  Start monitoring stationary region (radius: 150.0m 32.03295693401218,35.870645489198054 hAcc=26.563784)
10-15 14:07:26.796 26914 26914 W TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
10-15 14:07:26.796 26914 26914 W TSLocationManager:   ⚠️  Failed to initiate motion-activity updates (ERROR CODE: 10301, ACTIVITY_IDENTIFICATION_NOT_AVAILABLE).  This device does not support the Motion API due to missing sensors (eg: gyroscope, accelerometer).
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:26.796 26914 26914 W TSLocationManager: ║ DEVICE SENSORS
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╟─ ✅  ACCELEROMETER: {Sensor name="accelerometer-lis3dh", vendor="st", version=1, type=1, maxRange=78.4532, resolution=9.576806E-6, power=0.23, minDelay=5000}
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╟─ ⚠️  GYROSCOPE:  none.  Motion-detection system performance will be degraded
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╟─ ✅  MAGNETOMETER: {Sensor name="mag-akm09918", vendor="akm", version=1, type=2, maxRange=2000.0, resolution=0.0625, power=6.8, minDelay=10000}
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="significant Motion", vendor="huawei", version=1, type=17, maxRange=2.14748365E9, resolution=1.0, power=0.23, minDelay=-1}
10-15 14:07:26.796 26914 26914 W TSLocationManager: ╚═════════════════════════════════════════════
10-15 14:07:26.833 26914 26914 D TSLocationManager: [c.t.l.service.AbstractService a]
10-15 14:07:26.833 26914 26914 D TSLocationManager:   🎾  motionchange [TrackingService  startId: 1, eventCount: 1]
10-15 14:07:26.834 26914 26914 I TSLocationManager: [c.t.l.service.TrackingService k]
10-15 14:07:26.834 26914 26914 I TSLocationManager: ╔═════════════════════════════════════════════
10-15 14:07:26.834 26914 26914 I TSLocationManager: ║ TrackingService motionchange: false
10-15 14:07:26.834 26914 26914 I TSLocationManager: ╠═════════════════════════════════════════════
10-15 14:07:26.841 26914 26914 D TSLocationManager: [c.t.l.service.AbstractService a]
10-15 14:07:26.841 26914 26914 D TSLocationManager:   ⚙️︎   FINISH [TrackingService startId: 1, eventCount: 0, sticky: false]
10-15 14:07:26.843 26914 26914 W TSLocationManager: [c.t.l.g.TSGeofenceManager$e a]
10-15 14:07:26.843 26914 26914 W TSLocationManager:   ⚠️  Failed to start monitoring geofences: null 10200 GEOFENCE_NOT_AVAILABLE
10-15 14:07:26.843 26914 26914 D TSLocationManager: [c.t.l.g.TSGeofenceManager d] ℹ️  Persist monitored geofences: []
10-15 14:07:26.844 26914 26914 D TSLocationManager: [c.t.l.g.TSGeofenceManager e] ℹ️  Persist monitored polygons: {}
10-15 14:07:27.049 26914 26914 D TSLocationManager: [c.t.l.service.AbstractService f]
10-15 14:07:27.049 26914 26914 D TSLocationManager:   ⚙️︎  TrackingService.stopSelfResult(1): true
10-15 14:07:27.050 26914 26914 D TSLocationManager: [c.t.l.service.AbstractService onDestroy]
10-15 14:07:27.050 26914 26914 D TSLocationManager:   🔴  TrackingService stopped
10-15 14:07:27.412 26914 26914 W TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
10-15 14:07:27.412 26914 26914 W TSLocationManager:   ⚠️  Failed to initiate activity-transition updates (ERROR CODE: 10301, ACTIVITY_IDENTIFICATION_NOT_AVAILABLE).  This device does not support the Motion API due to missing sensors (eg: gyroscope, accelerometer).

hasan642 avatar Oct 15 '23 11:10 hasan642

10-15 14:07:26.796 26914 26914 W TSLocationManager: ⚠️ Failed to initiate motion-activity updates (ERROR CODE: 10301, ACTIVITY_IDENTIFICATION_NOT_AVAILABLE). This device does not support the Motion API due to missing sensors (eg: gyroscope, accelerometer).

Am I understanding correctly that upon seeing this notification, I need to enable tracking for such a device based on the locationUpdateInterval(distanceFilter=0)?

I have also encountered a similar issue on my Huawei device. I have completed all the steps from https://dontkillmyapp.com/, including requesting the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission, but the tracking with distanceFilter is still not working.

superyarik avatar Oct 15 '23 20:10 superyarik

did you face this issue before? @superyarik

hasan642 avatar Oct 16 '23 08:10 hasan642

@hasan642 no, I've just started testing with Huawei Y6p.

superyarik avatar Oct 16 '23 09:10 superyarik

is working with you? @superyarik

hasan642 avatar Oct 16 '23 13:10 hasan642

See Huawei error codes

christocracy avatar Oct 16 '23 13:10 christocracy

@christocracy 1- there is any function to check if the device supports geofencing or not? 2- there is no solution for this case, such as following instructions in dontkillmyapp?

Thank you for your support.

hasan642 avatar Oct 16 '23 14:10 hasan642

It is known that the Geofencing api from both Huawei and Google Play Services uses the motion api internally.

It seems that Huawei's motion api remains highly inferior to that of Google Play Services and does not work when the device has no gyroscope. Hopefully Huawei fixes that in a future update to their Location Kit package.

The Motion API from Google Play Services is able to operate with just an accelerometer.

There is no solution to this. It's up to Huawei to develop a better Motion API.

christocracy avatar Oct 16 '23 14:10 christocracy

Interesting note in the CHANGELOG for Huawei Location Kit, linked above:

image

Devices Supporting Geofence

christocracy avatar Oct 16 '23 14:10 christocracy

You can control the Huawei Location Kit version using gradle ext var hmsLocationVersion

christocracy avatar Oct 16 '23 14:10 christocracy

theres is a direct function or any way in the plugin to check if the huwaui device (or device in general) support geofencing or not, please?

hasan642 avatar Oct 17 '23 02:10 hasan642

Not currently. I will add one.

christocracy avatar Oct 17 '23 02:10 christocracy

waiting for this, thank you. @christocracy

hasan642 avatar Oct 17 '23 08:10 hasan642

any update in the function to check if geofencing enabled or not on the huwaui device? @christocracy

hasan642 avatar Jun 23 '24 11:06 hasan642

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 24 '24 01:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 07 '24 01:08 github-actions[bot]

any update on this?

abublihi avatar Dec 03 '24 07:12 abublihi