flutter_background_geolocation icon indicating copy to clipboard operation
flutter_background_geolocation copied to clipboard

Background service not working while app is in recent

Open shrenik-clu opened this issue 3 years ago • 3 comments

Your Environment

  • Plugin version: 4.7.1
  • Platform: Android
  • OS version: 11/12
  • Device manufacturer / model: Smasung M31/Samsung M40
  • Flutter info (flutter doctor):
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.5, on Ubuntu 20.10 5.8.0-63-generic, locale en_IN)                                                                                                       Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 4.2)
[✓] Android Studio (version 2021.2)
[✓] Android Studio
[✓] VS Code (version 1.62.3)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!
  • Plugin config:
PASTE_YOUR_CODE_HERE

Expected Behavior

It should work when app is minimized or in recent apps

Actual Behavior

Not working when we minimized the app and services also closed after 3 to 4 minutes

Steps to Reproduce

  1. Register with your organization id and name 2.Go to home page 3.Approve all the permissions 4.Turn on location fetch 5.Turn on background service
  2. Minimize the app(Do not kill app)

Context

We are trying to fetch geo location while app is in foreground as well as background. But the background case is not working.

Debug logs

Logs
PASTE_YOUR_LOGS_HERE

shrenik-clu avatar Aug 22 '22 17:08 shrenik-clu

The plugin behaviour is not affected by foreground vs background vs recent apps.

see wiki “Debugging”. Are you observing the plugin logs?

christocracy avatar Aug 22 '22 17:08 christocracy

@christocracy Thank you for your response Actually I am checking at your server when we are using the app the logs are continuously updating but when I minimize the app and checking your server no logs are there after that. It means the plugin is not working in background or when app is minimized

shrenik-clu avatar Aug 23 '22 16:08 shrenik-clu

Configure debug: true so you can hear the plugin operate.

also see https://dontkillmyapp.com

christocracy avatar Aug 23 '22 17:08 christocracy

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

github-actions[bot] avatar May 28 '24 01:05 github-actions[bot]

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

github-actions[bot] avatar Jun 11 '24 01:06 github-actions[bot]