transistorsoft / flutter_background_geolocation

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

Android Persisted Foreground Notification does not display #1343

Closed YaLazreq closed 3 months ago

YaLazreq commented 3 months ago

Your Environment

`):

bg.BackgroundGeolocation.ready(bg.Config( locationAuthorizationRequest: 'Always', notification: bg.Notification( title: "(TEST) The Notification Title", text: "(TEST) The Notification Text", priority: bg.Config.NOTIFICATION_PRIORITY_MAX), desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH, isMoving: true, distanceFilter: 100.0, disableElasticity: false, stopOnTerminate: true, startOnBoot: true, debug: true, foregroundService: true, logLevel: bg.Config.LOG_LEVEL_VERBOSE, )).then((bg.State state)


## Expected Behavior
The android notification should display like the photo 
<img width="338" alt="Screenshot 2024-08-06 at 17 22 21" src="https://github.com/user-attachments/assets/a209ae71-4dc5-4e41-9e7f-4bdab03b7213">

## Actual Behavior & Context
Position recovery works really well on iOS and Android. It's only the display of the notification that has a problem.

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat -s TSLocationManager
-->
<details>
    <summary>Logs</summary>

``` <!-- syntax-highligting:  DO NOT REMOVE -->
PASTE_YOUR_LOGS_HERE

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on sdk gphone64 arm64 is available at: http://127.0.0.1:55527/nLxQmK-f3-M=/
I/ground_location(13370): Compiler allocated 4948KB to compile void android.view.ViewRootImpl.performTraversals()
D/TSLocationManager(13370): [c.t.f.b.streams.StreamHandler onListen] location
D/TSLocationManager(13370): [c.t.f.b.streams.StreamHandler onListen] motionchange
D/TSLocationManager(13370): [c.t.f.b.streams.StreamHandler onListen] activitychange
D/TSLocationManager(13370): [c.t.f.b.streams.StreamHandler onListen] providerchange
D/TSLocationManager(13370): [c.t.f.b.streams.StreamHandler onListen] connectivitychange
D/TSLocationManager(13370): [c.t.l.adapter.TSConfig e] ℹ️   Persist config, dirty: [debug, desiredAccuracy, distanceFilter, extras, headers, headlessJobService, logLevel, notification, notification.title, notification.text, notification.priority, notification.sticky, params, schedule, startOnBoot]
W/Settings(13370): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
W/Settings(13370): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
The Flutter DevTools debugger and profiler on sdk gphone64 arm64 is available at: http://127.0.0.1:9102?uri=http://127.0.0.1:55527/nLxQmK-f3-M=/
I/flutter (13370): [ENABLE] 1 - ======================+> false
D/TSLocationManager(13370): [c.t.l.u.LocationAuthorization withBackgroundPermission] 
D/TSLocationManager(13370):   ℹ️  LocationAuthorization: Permission granted
I/flutter (13370): [_onProviderChange] : [ProviderChangeEvent enabled:true, status: 3, network: true, gps: true, accuracyAuthorization: 0]
I/TSLocationManager(13370): - Enable: false → true, trackingMode: 1
I/TSLocationManager(13370): [c.t.l.g.TSGeofenceManager start] 
I/TSLocationManager(13370):   🎾  Start monitoring geofences
D/TSLocationManager(13370): [c.t.l.g.TSGeofenceManager d] ℹ️  Persist monitored geofences: []
D/TSLocationManager(13370): [c.t.l.g.TSGeofenceManager e] ℹ️  Persist monitored polygons: {}
D/TSLocationManager(13370): [c.t.l.http.HttpService startMonitoringConnectivityChanges] 
D/TSLocationManager(13370):   🎾  Start monitoring connectivity changes
D/TSLocationManager(13370): [c.t.l.device.DeviceSettings startMonitoringPowerSaveChanges] 
D/TSLocationManager(13370):   🎾  Start monitoring powersave changes
I/TSLocationManager(13370): [c.t.l.s.ActivityRecognitionService start] 
I/TSLocationManager(13370):   🎾  Start motion-activity updates
I/TSLocationManager(13370): [c.t.l.service.HeartbeatService stop] 
I/TSLocationManager(13370):   🔴  Stop heartbeat
W/Settings(13370): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
D/TSLocationManager(13370): [c.t.l.g.TSGeofenceManager stopMonitoringStationaryRegion] 
D/TSLocationManager(13370):   🔴  Stop monitoring stationary region
D/TSLocationManager(13370): [c.t.l.http.HttpService a] 
D/TSLocationManager(13370): ╔═════════════════════════════════════════════
D/TSLocationManager(13370): ║ 📶  Connectivity change: connected? true
D/TSLocationManager(13370): ╠═════════════════════════════════════════════
I/TSLocationManager(13370): [c.t.l.service.TrackingService changePace] 
I/TSLocationManager(13370):   🔵  setPace: true → true
I/flutter (13370): [_onConnectivityChange] : [ConnectivityChangeEvent connected: true]
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   🎾  motionchange [TrackingService  startId: 1, eventCount: 1]
I/TSLocationManager(13370): [c.t.l.service.TrackingService k] 
I/TSLocationManager(13370): ╔═════════════════════════════════════════════
I/TSLocationManager(13370): ║ TrackingService motionchange: true
I/TSLocationManager(13370): ╠═════════════════════════════════════════════
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   ⚙️︎   FINISH [TrackingService startId: 1, eventCount: 0, sticky: true]
I/TSLocationManager(13370): [c.t.l.l.TSLocationManager a] 
I/TSLocationManager(13370): ╔═════════════════════════════════════════════
I/TSLocationManager(13370): ║ motionchange LocationResult: 1 (4214ms old)
I/TSLocationManager(13370): ╠═════════════════════════════════════════════
I/TSLocationManager(13370): ╟─ 📍  Location[fused 48.889409,2.292860 hAcc=100.0 et=+13h49m16s71ms alt=0.0 vAcc=100.0], time: 1722957949285
D/TSLocationManager(13370): [c.t.l.l.TSLocationManager a] Median accuracy: 100.0
D/TSLocationManager(13370): [c.t.l.u.LocationAuthorization withPermission] 
D/TSLocationManager(13370):   ℹ️  LocationAuthorization: Permission granted
I/flutter (13370): [location] - 48.8894091, 2.2928602
I/flutter (13370): [KM] - 9085.1
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   🎾  start [LocationRequestService  startId: 1, eventCount: 1]
I/TSLocationManager(13370): [c.t.l.l.SingleLocationRequest startUpdatingLocation] 
I/TSLocationManager(13370):   🔵  [SingleLocationRequest start, action: 1, requestId: 1]
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true]
D/TSLocationManager(13370): [c.t.l.a.TSLocationManagerActivity a] locationsettings
D/TSLocationManager(13370): [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
W/DynamiteModule(13370): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
W/ground_location(13370): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
W/ground_location(13370): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
D/TSLocationManager(13370): [c.t.l.a.TSLocationManagerActivity c] eventCount: 0
I/DynamiteModule(13370): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller(13370): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
D/nativeloader(13370): Configuring clns-7 for other apk /system/framework/org.apache.http.legacy.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/nativeloader(13370): Configuring clns-8 for other apk /system/framework/com.android.media.remotedisplay.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/nativeloader(13370): Configuring clns-9 for other apk /system/framework/com.android.location.provider.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/ApplicationLoaders(13370): Returning zygote-cached class loader: /system_ext/framework/androidx.window.extensions.jar
D/ApplicationLoaders(13370): Returning zygote-cached class loader: /system_ext/framework/androidx.window.sidecar.jar
W/ground_location(13370): Loading /data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/oat/arm64/base.odex non-executable as it requires an image which we failed to load
D/nativeloader(13370): Configuring clns-10 for other apk /data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
V/MediaPlayer(13370): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(13370): cleanDrmObj: mDrmObj=null mDrmSessionId=null
D/TSLocationManager(13370): [c.t.l.a.TSLocationManagerActivity onDestroy] 
W/WindowOnBackDispatcher(13370): sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@dca4466
D/nativeloader(13370): Load /data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a/libconscrypt_gmscore_jni.so using ns clns-10 from class loader (caller=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!classes3.dex): ok
V/NativeCrypto(13370): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 305 native methods...
W/ground_location(13370): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (unsupported, reflection, allowed)
I/ProviderInstaller(13370): Installed default security provider GmsCore_OpenSSL
D/TrafficStats(13370): tagSocket(178) with statsTag=0xffffffff, statsUid=-1
W/ground_location(13370): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (unsupported, reflection, allowed)
W/ground_location(13370): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (unsupported, reflection, allowed)
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   🎾  1:1 [LocationRequestService  startId: 2, eventCount: 1]
I/TSLocationManager(13370): [c.t.l.l.TSLocationManager a] 
I/TSLocationManager(13370): ╔═════════════════════════════════════════════
I/TSLocationManager(13370): ║ motionchange LocationResult: 1 (27ms old)
I/TSLocationManager(13370): ╠═════════════════════════════════════════════
I/TSLocationManager(13370): ╟─ 📍  Location[fused 48.889420,2.292850 hAcc=5.0 et=+13h49m24s790ms alt=0.0 vAcc=0.5 vel=8.33943 sAcc=0.5 bear=146.7223 bAcc=30.0], time: 1722957958003
I/TSLocationManager(13370): [c.t.l.l.TSLocationManager onSingleLocationResult] 
I/TSLocationManager(13370):   🔵  Acquired motionchange position, isMoving: true
D/TSLocationManager(13370): [c.t.l.l.TSLocationManager a] Median accuracy: 52.5
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
D/TSLocationManager(13370): [c.t.l.service.AbstractService b] 
D/TSLocationManager(13370):   🎾  STOP [LocationRequestService startId: 3, eventCount: 2]
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 1, sticky: false]
I/flutter (13370): [location] - 48.88942, 2.29285
I/flutter (13370): [KM] - 9085.1
I/flutter (13370): [motionchange] - [Location {odometer: 9085123.0, activity: {confidence: 100, type: still}, extras: {}, event: motionchange, battery: {level: 1.0, is_charging: false}, uuid: e5287b9a-3174-45d1-8de5-0aa09af6ba7d, age: 32, coords: {altitude: 0.0, heading: 146.72, latitude: 48.88942, accuracy: 5.0, heading_accuracy: 30.0, altitude_accuracy: 0.5, speed_accuracy: 0.5, speed: 8.34, age: 49, longitude: 2.29285, ellipsoidal_altitude: 0.0}, is_moving: true, timestamp: 2024-08-06T15:25:58.003Z}] 
I/TSLocationManager(13370): [c.t.l.l.TSLocationManager requestLocationUpdates] 
I/TSLocationManager(13370):   🎾  Location-services: ON
D/TSLocationManager(13370): [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
I/TSLocationManager(13370): [c.t.l.s.ActivityRecognitionService start] 
I/TSLocationManager(13370):   🎾  Start motion-activity updates
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: false]
I/TSLocationManager(13370): [c.t.l.d.s.SQLiteLocationDAO persist] 
I/TSLocationManager(13370):   ✅  INSERT: e5287b9a-3174-45d1-8de5-0aa09af6ba7d
D/EGL_emulation(13370): app_time_stats: avg=923.98ms min=9.26ms max=4235.47ms count=5
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
E/TSLocationManager(13370): [c.t.l.s.ForegroundNotification a] 
E/TSLocationManager(13370):   ‼️  Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout
E/ground_location(13370): Invalid resource ID 0x00000000.
W/TSLocationManager(13370): [c.t.l.s.ForegroundNotification b] Failed to find notificationLargeIcon: mipmap/my_large_icon
D/TSLocationManager(13370): [c.t.l.service.AbstractService a] 
D/TSLocationManager(13370):   🎾  start [TrackingService  startId: 2, eventCount: 1]
D/TSLocationManager(13370): [c.t.l.service.TrackingService c] 
D/TSLocationManager(13370): ╔═════════════════════════════════════════════
D/TSLocationManager(13370): ║ TrackingService: LocationResult

christocracy commented 3 months ago

‼️ Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout

That looks pretty obvious to me that you’ve configure your custom layout wrong.

LazreqYa commented 3 months ago

‼️ Could not find custom notification layout 'my_notification_layout' in app/src/main/res/layout

That looks pretty obvious to me that you’ve configure your custom layout wrong.

If you speak about the image, it's not my config, it's only for showing the expecting notification.

Yeah, i know, there is a mistake, do you know where in the 'ready.(bg.Config' ?

christocracy commented 3 months ago

The notification is shown only when the device is detected to be moving.

expect no notification when the device is sitting stationary (read wiki “Philosophy of Operation”.)

christocracy commented 3 months ago

If you can’t figure out how to use a complex feature like “custom notifications”, then don’t use it.

YaLazreq commented 3 months ago

The notification is shown only when the device is detected to be moving. @christocracy

⚠️ I sent you the wrong logs (where i was trying code from other repo). there is the good one

Your Environment

Plugin version: 4.15.5 Platform: Flutter -> Android OS version: sonoma 14.5 Device manufacturer / model: macbookpro m3 Flutter info (` [✓] Flutter (Channel stable, 3.22.3, on macOS 14.5 23F79 darwin-arm64, locale en-FR) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.92.0) [✓] Connected device (4 available) [✓] Network resources

bg.BackgroundGeolocation.ready(bg.Config(
      locationAuthorizationRequest: 'Always',
      notification: bg.Notification(
          title: "(TEST) The Notification Title",
          text: "(TEST) The Notification Text",
          priority: bg.Config.NOTIFICATION_PRIORITY_MAX),
      desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
      isMoving: true,
      distanceFilter: 10.0,
      disableElasticity: false,
      stopOnTerminate: true,
      startOnBoot: true,
      debug: true,
      foregroundService: true,
      logLevel: bg.Config.LOG_LEVEL_VERBOSE,
    )).then((bg.State state)

Expected Behavior

The android notification should display like the photo Screenshot_20240806_190039_One UI Home

Actual Behavior

As you can see my app is running and getting location but no persisted notif:

Screenshot 2024-08-06 at 18 55 36

I also downloaded the apk to on real phone and same result, no notif.

Context

Getting location of a user (foreground and background), and as Android want, show the persisted notification when the app is getting location

Debug logs

Logs ``` ✓ Built build/app/outputs/flutter-apk/app-debug.apk Syncing files to device sdk gphone64 arm64... 61ms Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device). A Dart VM Service on sdk gphone64 arm64 is available at: http://127.0.0.1:60520/ykXh7MGdWko=/ I/ground_location(22137): Compiler allocated 4948KB to compile void android.view.ViewRootImpl.performTraversals() D/TSLocationManager(22137): [c.t.f.b.streams.StreamHandler onListen] location D/TSLocationManager(22137): [c.t.f.b.streams.StreamHandler onListen] motionchange D/TSLocationManager(22137): [c.t.f.b.streams.StreamHandler onListen] activitychange D/TSLocationManager(22137): [c.t.f.b.streams.StreamHandler onListen] providerchange D/TSLocationManager(22137): [c.t.f.b.streams.StreamHandler onListen] connectivitychange D/TSLocationManager(22137): [c.t.l.adapter.TSConfig e] ℹ️ Persist config, dirty: [debug, desiredAccuracy, extras, headers, headlessJobService, logLevel, notification, notification.title, notification.text, notification.priority, params, schedule, startOnBoot] W/Settings(22137): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. W/Settings(22137): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. The Flutter DevTools debugger and profiler on sdk gphone64 arm64 is available at: http://127.0.0.1:9102?uri=http://127.0.0.1:60520/ykXh7MGdWko=/ I/flutter (22137): [ENABLE] 1 - ======================+> false D/TSLocationManager(22137): [c.t.l.u.LocationAuthorization withBackgroundPermission] D/TSLocationManager(22137): ℹ️ LocationAuthorization: Permission granted I/flutter (22137): [_onProviderChange] : [ProviderChangeEvent enabled:true, status: 3, network: true, gps: true, accuracyAuthorization: 0] I/TSLocationManager(22137): - Enable: false → true, trackingMode: 1 I/TSLocationManager(22137): [c.t.l.g.TSGeofenceManager start] I/TSLocationManager(22137): 🎾 Start monitoring geofences D/TSLocationManager(22137): [c.t.l.g.TSGeofenceManager d] ℹ️ Persist monitored geofences: [] D/TSLocationManager(22137): [c.t.l.g.TSGeofenceManager e] ℹ️ Persist monitored polygons: {} D/TSLocationManager(22137): [c.t.l.http.HttpService startMonitoringConnectivityChanges] D/TSLocationManager(22137): 🎾 Start monitoring connectivity changes D/TSLocationManager(22137): [c.t.l.device.DeviceSettings startMonitoringPowerSaveChanges] D/TSLocationManager(22137): 🎾 Start monitoring powersave changes I/TSLocationManager(22137): [c.t.l.s.ActivityRecognitionService start] I/TSLocationManager(22137): 🎾 Start motion-activity updates W/Settings(22137): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. D/TSLocationManager(22137): [c.t.l.http.HttpService a] D/TSLocationManager(22137): ╔═════════════════════════════════════════════ D/TSLocationManager(22137): ║ 📶 Connectivity change: connected? true D/TSLocationManager(22137): ╠═════════════════════════════════════════════ I/TSLocationManager(22137): [c.t.l.service.HeartbeatService stop] I/TSLocationManager(22137): 🔴 Stop heartbeat I/TSLocationManager(22137): [c.t.l.service.TrackingService changePace] I/TSLocationManager(22137): 🔵 setPace: true → true I/flutter (22137): [_onConnectivityChange] : [ConnectivityChangeEvent connected: true] D/TSLocationManager(22137): [c.t.l.service.AbstractService a] D/TSLocationManager(22137): 🎾 motionchange [TrackingService startId: 1, eventCount: 1] I/TSLocationManager(22137): [c.t.l.service.TrackingService k] I/TSLocationManager(22137): ╔═════════════════════════════════════════════ I/TSLocationManager(22137): ║ TrackingService motionchange: true I/TSLocationManager(22137): ╠═════════════════════════════════════════════ D/TSLocationManager(22137): [c.t.l.service.AbstractService a] D/TSLocationManager(22137): ⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: true] I/TSLocationManager(22137): [c.t.l.l.TSLocationManager a] I/TSLocationManager(22137): ╔═════════════════════════════════════════════ I/TSLocationManager(22137): ║ motionchange LocationResult: 1 (2032ms old) I/TSLocationManager(22137): ╠═════════════════════════════════════════════ I/TSLocationManager(22137): ╟─ 📍 Location[fused 48.888000,2.288844 hAcc=5.012 et=+14h39m53s108ms alt=0.0 vAcc=0.5 vel=8.726475 sAcc=1.5 bear=6.236004 bAcc=45.0 {Bundle[{battery_level=1.0, is_charging=false, odometer=9116886.0}]}], time: 1722963757775 I/TSLocationManager(22137): [c.t.l.l.TSLocationManager onSingleLocationResult] I/TSLocationManager(22137): 🔵 Acquired motionchange position, isMoving: true D/TSLocationManager(22137): [c.t.l.l.TSLocationManager a] Median accuracy: 5.012 I/TSLocationManager(22137): [c.t.l.l.TSLocationManager requestLocationUpdates] I/TSLocationManager(22137): 🎾 Location-services: ON D/TSLocationManager(22137): [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 I/TSLocationManager(22137): [c.t.l.d.s.SQLiteLocationDAO persist] I/TSLocationManager(22137): ✅ INSERT: 9a1cbfc4-ae5c-4279-ac23-b6b7bf8c1cc7 I/TSLocationManager(22137): [c.t.l.s.ActivityRecognitionService start] I/TSLocationManager(22137): 🎾 Start motion-activity updates I/flutter (22137): [location] - 48.8880002, 2.2888443 I/flutter (22137): [KM] - 9116.9 I/flutter (22137): [motionchange] - [Location {odometer: 9116886.0, activity: {confidence: 100, type: still}, extras: {}, event: motionchange, battery: {level: 1.0, is_charging: false}, uuid: 9a1cbfc4-ae5c-4279-ac23-b6b7bf8c1cc7, age: 2053, coords: {altitude: 0.0, heading: 6.24, latitude: 48.8880002, accuracy: 5.01, heading_accuracy: 45.0, altitude_accuracy: 0.5, speed_accuracy: 1.5, speed: 8.73, age: 2088, longitude: 2.2888443, ellipsoidal_altitude: 0.0}, is_moving: true, timestamp: 2024-08-06T17:02:37.775Z}] W/DynamiteModule(22137): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found. I/DynamiteModule(22137): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0 W/ProviderInstaller(22137): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0. D/nativeloader(22137): Configuring clns-7 for other apk /system/framework/org.apache.http.legacy.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms D/nativeloader(22137): Configuring clns-8 for other apk /system/framework/com.android.media.remotedisplay.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms D/nativeloader(22137): Configuring clns-9 for other apk /system/framework/com.android.location.provider.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms D/ApplicationLoaders(22137): Returning zygote-cached class loader: /system_ext/framework/androidx.window.extensions.jar D/ApplicationLoaders(22137): Returning zygote-cached class loader: /system_ext/framework/androidx.window.sidecar.jar W/ground_location(22137): Loading /data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/oat/arm64/base.odex non-executable as it requires an image which we failed to load D/nativeloader(22137): Configuring clns-10 for other apk /data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/lib/arm64:/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms D/TSLocationManager(22137): [c.t.l.a.TSLocationManagerActivity a] locationsettings D/TSLocationManager(22137): [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 W/ground_location(22137): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed) W/ground_location(22137): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed) D/TSLocationManager(22137): [c.t.l.a.TSLocationManagerActivity c] eventCount: 0 D/nativeloader(22137): Load /data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!/lib/arm64-v8a/libconscrypt_gmscore_jni.so using ns clns-10 from class loader (caller=/data/app/~~HDQR8DZA4ZRbbzYXAK5bOg==/com.google.android.gms-BsJQFGePoQsn68b3dLLmzQ==/base.apk!classes3.dex): ok D/TSLocationManager(22137): [c.t.l.a.TSLocationManagerActivity onDestroy] W/WindowOnBackDispatcher(22137): sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@3f9343 V/NativeCrypto(22137): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 305 native methods... W/ground_location(22137): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (unsupported, reflection, allowed) I/ProviderInstaller(22137): Installed default security provider GmsCore_OpenSSL D/TrafficStats(22137): tagSocket(181) with statsTag=0xffffffff, statsUid=-1 W/ground_location(22137): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (unsupported, reflection, allowed) W/ground_location(22137): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (unsupported, reflection, allowed) V/MediaPlayer(22137): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false V/MediaPlayer(22137): cleanDrmObj: mDrmObj=null mDrmSessionId=null W/MediaPlayer(22137): mediaplayer went away with unhandled events D/TSLocationManager(22137): [c.t.l.service.AbstractService a] D/TSLocationManager(22137): 🎾 start [TrackingService startId: 2, eventCount: 1] D/TSLocationManager(22137): [c.t.l.service.TrackingService c] D/TSLocationManager(22137): ╔═════════════════════════════════════════════ D/TSLocationManager(22137): ║ TrackingService: LocationResult D/TSLocationManager(22137): ╠═════════════════════════════════════════════ D/TSLocationManager(22137): ╟─ 📍 Location[fused 48.888268,2.289205 hAcc=5.0 et=+14h39m59s161ms alt=0.0 vAcc=0.5 vel=8.894648 sAcc=0.5 bear=52.116745 bAcc=30.0] D/TSLocationManager(22137): ╟─ Age: 14ms, time: 1722963763829 D/TSLocationManager(22137): [c.t.l.service.AbstractService a] D/TSLocationManager(22137): ⚙️︎ FINISH [TrackingService startId: 2, eventCount: 0, sticky: true] D/TSLocationManager(22137): [c.t.l.l.TSLocationManager onLocationResult] D/TSLocationManager(22137): ╔═════════════════════════════════════════════ D/TSLocationManager(22137): ║ Process LocationResult D/TSLocationManager(22137): ╠═════════════════════════════════════════════ I/TSLocationManager(22137): [c.t.l.l.TSLocationManager onLocationResult] I/TSLocationManager(22137): 🔵 Re-scaled distanceFilter: 10.0->30.0) D/TSLocationManager(22137): [c.t.l.l.TSLocationManager d] Distance from last location: 39.834152, apparent speed: 6.5808945 D/TSLocationManager(22137): [c.t.l.l.TSLocationManager a] Median accuracy: 5.006 D/TSLocationManager(22137): [c.t.l.l.TSLocationManager c] Odometer: 9116926.0 I/flutter (22137): [location] - 48.8882679, 2.2892052 I/flutter (22137): [KM] - 9116.9 D/EGL_emulation(22137): app_time_stats: avg=695.27ms min=9.97ms max=3862.35ms count=6 D/TSLocationManager(22137): [c.t.l.service.AbstractService a] D/TSLocationManager(22137): 🎾 start [TrackingService startId: 3, eventCount: 1] D/TSLocationManager(22137): [c.t.l.service.TrackingService c] D/TSLocationManager(22137): ╔═════════════════════════════════════════════ D/TSLocationManager(22137): ║ TrackingService: LocationResult D/TSLocationManager(22137): ╠═════════════════════════════════════════════ D/TSLocationManager(22137): ╟─ 📍 Location[fused 48.888268,2.289205 hAcc=5.0 et=+14h39m59s161ms alt=0.0 vAcc=0.5 vel=8.894648 sAcc=0.5 bear=52.116745 bAcc=30.0] D/TSLocationManager(22137): ╟─ Age: 96ms, time: 1722963763829 I/TSLocationManager(22137): [c.t.l.d.s.SQLiteLocationDAO persist] I/TSLocationManager(22137): ✅ INSERT: 6731a454-249b-4293-8128-42e1d739d28f D/TSLocationManager(22137): [c.t.l.l.TSLocationManager onLocationResult] D/TSLocationManager(22137): ╔═════════════════════════════════════════════ D/TSLocationManager(22137): ║ Process LocationResult D/TSLocationManager(22137): ╠═════════════════════════════════════════════ D/TSLocationManager(22137): [c.t.l.l.TSLocationManager onLocationResult] D/TSLocationManager(22137): ℹ️ IGNORED: same as last location I/TSLocationManager(22137): [c.t.l.s.TSScheduleManager oneShot] I/TSLocationManager(22137): ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116) W/TSLocationManager(22137): [c.t.l.s.TSScheduleManager oneShot] W/TSLocationManager(22137): ℹ️ Scheduling exact alarms requires android.permission.USE_EXACT_ALARM with SDK >= 34. Oneshot using in-exact Alarm D/TSLocationManager(22137): [c.t.l.service.AbstractService a] D/TSLocationManager(22137): ⚙️︎ FINISH [TrackingService startId: 3, eventCount: 0, sticky: true] V/MediaPlayer(22137): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false V/MediaPlayer(22137): cleanDrmObj: mDrmObj=null mDrmSessionId=null ```
christocracy commented 3 months ago

Check your notification settings in App settings

YaLazreq commented 3 months ago

Yes, thank you chris. Now getting the notif but not persisted. as you can see i can remove it

Screenshot 2024-08-06 at 19 35 46
christocracy commented 3 months ago

Now getting the notif but not persisted. as you can see i can remove it

That’s right. Android 14 now allows users to dismiss foreground-service notifications.

IMG_1986

https://developer.android.com/about/versions/14/behavior-changes-all

YaLazreq commented 3 months ago

so everything good. Thanks for the search ✅