Closed YaLazreq closed 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.
‼️ 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' ?
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”.)
If you can’t figure out how to use a complex feature like “custom notifications”, then don’t use it.
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
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)
The android notification should display like the photo
As you can see my app is running and getting location but no persisted notif:
I also downloaded the apk to on real phone and same result, no notif.
Getting location of a user (foreground and background), and as Android want, show the persisted notification when the app is getting location
Check your notification settings in App settings
Yes, thank you chris. Now getting the notif but not persisted. as you can see i can remove it
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.
https://developer.android.com/about/versions/14/behavior-changes-all
so everything good. Thanks for the search ✅
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)