transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
636 stars 235 forks source link

google maps affect on background tracking? #372

Closed ammarmahafeza2 closed 3 years ago

ammarmahafeza2 commented 4 years ago

Your Environment

Actual Behavior

after change configuration its not worked on chines devices but works in Samsung

christocracy commented 4 years ago

See http://dontkillmyapp.com

ammarmahafeza2 commented 4 years ago
christocracy commented 4 years ago

Why don’t you apply the recommendations at http://dontkillmyapp.com and see?

ammarmahafeza2 commented 4 years ago

i saw it before but i asked you if the the permission affected on the plugins

christocracy commented 4 years ago

No code is immune from the poor behavior of various Android manufacturers.

There are no developer solutions.

ammarmahafeza2 commented 4 years ago

then the permission doesn't help me to run my app in background and the plugins depend on android behavior to fire in background

christocracy commented 4 years ago

See wiki Debugging. Are you fetching and reading the logs?

christocracy commented 4 years ago

Btw, Huawei are the absolute worst devices on earth for killing or ignoring services.

You need to do more than simply “Ignore battery optimizations”. Follow the exact steps at http://dontkillmyapp.com.

I test daily on 11 devices:

ammarmahafeza2 commented 4 years ago

I try to run this $ adb logcat *:S TSLocationManager:V flutter:V but nothing happen

ammarmahafeza2 commented 4 years ago

this Event Run After Killed The App 2020-08-17 13:10:15.651 10257-10471/com.ensperity.projectcoronas I/flutter: [getCurrentPosition] Headless OUT:------> connectivitychange 2020-08-17 13:10:15.658 10257-10471/com.ensperity.projectcoronas I/flutter: [getCurrentPosition] Headless OUT:------> providerchange 2020-08-17 13:10:15.715 10257-10471/com.ensperity.projectcoronas I/flutter: [getCurrentPosition] Headless OUT:------> terminate 2020-08-17 13:10:15.715 10257-10471/com.ensperity.projectcoronas I/flutter: ===============------> TERMINATED!!

christocracy commented 4 years ago

Check your logLevel.

ammarmahafeza2 commented 4 years ago

logLevel: bg.Config.LOG_LEVEL_VERBOSE,

ammarmahafeza2 commented 4 years ago
  ╔═════════════════════════════════════════════
    ║ TSLocationManager version: 3.1.5 (361)
    ╠═════════════════════════════════════════════
    ╟─ HUAWEI MAR-LX1A @ 10 (flutter)
    {
      "activityRecognitionInterval": 10000,
      "allowIdenticalLocations": true,
      "authorization": {},
      "autoSync": true,
      "autoSyncThreshold": 0,
      "batchSync": false,
      "configUrl": "",
      "debug": false,
      "deferTime": 0,
      "desiredAccuracy": -1,
      "desiredOdometerAccuracy": 100,
      "disableAutoSyncOnCellular": false,
      "disableElasticity": false,
      "disableLocationAuthorizationAlert": false,
      "disableMotionActivityUpdates": false,
      "disableStopDetection": false,
      "distanceFilter": 10,
      "elasticityMultiplier": 1,
      "enableHeadless": true,
      "enableTimestampMeta": false,
      "encrypt": false,
      "extras": {},
      "fastestLocationUpdateInterval": -1,
      "forceReloadOnBoot": false,
      "forceReloadOnGeofence": false,
      "forceReloadOnHeartbeat": false,
      "forceReloadOnLocationChange": true,
      "forceReloadOnMotionChange": false,
      "forceReloadOnSchedule": false,
      "foregroundService": true,
      "geofenceInitialTriggerEntry": true,
      "geofenceModeHighAccuracy": false,
      "geofenceProximityRadius": 1000,
      "geofenceTemplate": "",
      "headers": {},
      "headlessJobService": "com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask",
      "heartbeatInterval": 120,
      "httpRootProperty": "location",
      "httpTimeout": 60000,
      "isMoving": false,
      "locationAuthorizationRequest": "Always",
      "locationTemplate": "",
      "locationTimeout": 60,
      "locationUpdateInterval": 5000,
      "locationsOrderDirection": "ASC",
      "logLevel": 5,
      "logMaxDays": 3,
      "maxBatchSize": -1,
      "maxDaysToPersist": 1,
      "maxRecordsToPersist": -1,
      "method": "POST",
      "minimumActivityRecognitionConfidence": 75,
      "motionTriggerDelay": 0,
      "notification": {
        "layout": "",
        "title": "",
        "text": "Location Service activated",
        "color": "",
        "channelName": "TSLocationManager",
        "smallIcon": "",
        "largeIcon": "",
        "priority": 0,
        "strings": {},
        "actions": []
      },
      "params": {},
      "persist": true,
      "persistMode": 2,
      "schedule": [],
      "scheduleUseAlarmManager": false,
      "speedJumpFilter": 300,
      "startOnBoot": true,
      "stationaryRadius": 25,
      "stopAfterElapsedMinutes": 0,
      "stopOnStationary": false,
      "stopOnTerminate": false,
      "stopTimeout": 1,
      "triggerActivities": "on_foot, walking, running, in_vehicle, on_bicycle",
      "url": "",
      "useSignificantChangesOnly": false,
      "enabled": true,
      "schedulerEnabled": false,
      "trackingMode": 1,
      "odometer": 0,
      "isFirstBoot": false,
      "didLaunchInBackground": false
    }
2020-08-18 09:47:38.110 1282-1282/com.ensperity.projectcoronas I/TSLocationManager: [c.t.l.adapter.TSConfig print] 
    ╔═════════════════════════════════════════════
    ║ DEVICE SENSORS
    ╠═════════════════════════════════════════════
    ╟─ ✅  ACCELEROMETER: {Sensor name="accelerometer-bmi160", vendor="bosch", version=1, type=1, maxRange=78.4532, resolution=9.576806E-6, power=0.23, minDelay=4000}
    ╟─ ✅  GYROSCOPE: {Sensor name="bosch-bmi160", vendor="bosch", version=1, type=4, maxRange=34.906586, resolution=1.7453292E-5, power=6.1, minDelay=4000}
    ╟─ ✅  MAGNETOMETER: {Sensor name="mag-akm09918", vendor="akm", version=1001, type=2, maxRange=2000.0, resolution=0.0625, power=6.8, minDelay=10000}
    ╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="significant Motion", vendor="huawei", version=1, type=17, maxRange=2.14748365E9, resolution=1.0, power=0.23, minDelay=-1}
    ╚═════════════════════════════════════════════
2020-08-18 09:47:38.123 1282-1282/com.ensperity.projectcoronas I/TSLocationManager: [c.t.l.a.BackgroundGeolocation <init>] 
      ✅  Google Play Services: connected (version code:12451000)
2020-08-18 09:47:38.135 1282-1430/com.ensperity.projectcoronas D/TSLocationManager: [c.t.l.l.TSLocationManager$d run] 
      ℹ️  Load last odometer location: Location[TSLocationManager 32******,36****** hAcc=93 t=?!? et=?!? vAcc=??? sAcc=??? bAcc=??? {Bundle[{odometer=0.0}]}]
2020-08-18 09:47:38.140 1282-1431/com.ensperity.projectcoronas D/TSLocationManager: [c.t.l.data.sqlite.b prune] 
      ℹ️  PRUNE -1 days
2020-08-18 09:47:38.153 1282-1282/com.ensperity.projectcoronas D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2020-08-18 09:47:38.156 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
2020-08-18 09:47:38.156 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
2020-08-18 09:47:38.156 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
2020-08-18 09:47:38.163 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.l.http.HttpService startMonitoringConnectivityChanges] 
      🎾  Start monitoring connectivity changes
2020-08-18 09:47:38.171 1282-1423/com.ensperity.projectcoronas D/TSLocationManager: [c.t.l.http.HttpService a] 
    ╔═════════════════════════════════════════════
    ║ 📶  Connectivity change: connected? true
    ╠═════════════════════════════════════════════
2020-08-18 09:47:38.176 1282-1282/com.ensperity.projectcoronas I/TSLocationManager: [c.t.l.a.BackgroundGeolocation f] 
      🎾  Start monitoring location-provider changes
2020-08-18 09:47:38.190 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/location
2020-08-18 09:47:38.190 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/motionchange
2020-08-18 09:47:38.191 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/activitychange
2020-08-18 09:47:38.192 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/geofenceschange
2020-08-18 09:47:38.193 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/geofence
2020-08-18 09:47:38.194 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/heartbeat
2020-08-18 09:47:38.195 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/http
2020-08-18 09:47:38.196 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/schedule
2020-08-18 09:47:38.197 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/connectivitychange
2020-08-18 09:47:38.197 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/enabledchange
2020-08-18 09:47:38.198 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/providerchange
2020-08-18 09:47:38.199 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/powersavechange
2020-08-18 09:47:38.200 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/notificationaction
2020-08-18 09:47:38.201 1282-1282/com.ensperity.projectcoronas D/TSLocationManager: [c.t.f.b.streams.StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/authorization
2020-08-18 09:47:38.208 1282-1282/com.ensperity.projectcoronas D/BeaconParser: Parsing beacon layout: m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24
2020-08-18 09:47:38.291 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist, reflection, allowed)
2020-08-18 09:47:38.291 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed)
2020-08-18 09:47:38.291 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
2020-08-18 09:47:38.291 1282-1282/com.ensperity.projectcoronas W/.projectcorona: Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
2020-08-18 09:47:38.305 1282-1282/com.ensperity.projectcoronas V/HwWidgetFactory: : successes to get AllImpl object and return....
2020-08-18 09:47:38.320 1282-1282/com.ensperity.projectcoronas D/ActivityThread: add activity client record, r= ActivityRecord{e8b4c05 token=android.os.BinderProxy@66ce7d2 {com.ensperity.projectcoronas/com.ensperity.projectcoronas.MainActivity}} token= android.os.BinderProxy@66ce7d2
2020-08-18 09:47:38.364 1282-1391/com.ensperity.projectcoronas I/FA: Tag Manager is not found and thus will not be used
2020-08-18 09:47:38.382 1282-1447/com.ensperity.projectcoronas D/HiTouch_PressGestureDetector: onAttached, package=com.ensperity.projectcoronas, windowType=1, mHiTouchRestricted=false
2020-08-18 09:47:38.421 1282-1388/com.ensperity.projectcoronas D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
2020-08-18 09:47:38.429 1282-1393/com.ensperity.projectcoronas D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
christocracy commented 4 years ago

╟─ HUAWEI MAR-LX1A @ 10

See http://dontkillmyapp.com. Huawei is the worst offender for crippling background-services.

ammarmahafeza2 commented 4 years ago

i'm with u with that , always has problem , but this time our client just using Huawei, So we need to optimize it for that, are there's any somthing help us in that

christocracy commented 4 years ago

The only solution is for users to modify their device Settings as documented at http://dontkillmyapp.com. There is no developer solution.

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. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] commented 3 years ago

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.