Questions tagged [flutter-background]

18 questions
2
votes
1 answer

How to play audio with the workmanager package using Flutter?

I want to play 1 (or more) scheduled short audio bells in the executeTask callback from the workmanager package when the user puts in the app in the background. executeTask callback always fires when it should. However -- the audio does not play…
Kdon
  • 892
  • 6
  • 19
1
vote
0 answers

How to push notifications in the background (even when the app is closed), when a boolean flag in firebase database is set to true in flutter?

I want to push a notification in both foreground and background in a flutter app when a bool flag is set to true. I gone through the example given in flutter_background_service package but I can't unserstand where to write the code to check the flag…
1
vote
0 answers

How to run timer in the background even the app is killed in flutter?

I am trying to make the application send a notification when a specified period has elapsed, and this works well when the application is in the background, but when the application is closed, it does not do so, and I tried workmanager, but the…
1
vote
1 answer

Flutter Background Service does not work on android 8

Service works properly on Android 9 and above facing issues on devices 8<= Notification disappears in some duration and location services stops I have also disabled battery optimization but it did not work Is there anyway to perform background…
0
votes
1 answer

Flutter_background_service: how to communicate between UI and background thread

The title says almost all - I'm not sure how to call invoke and on methods from the Flutter_background_service plugin, so that UI will be able to receive messages from the background and vice-versa? Any advice would be much appreciated.
0
votes
0 answers

Flutter iOS : Cache a notification when displayed in background

I am able to receive notifications in Flutter with iOS and Android and am able to store notifications in cache with the shared_preferences package in foreground and background in Android. I am able to do the same in foreground with iOS but not in…
0
votes
0 answers

Does Flutter FlutterBackgroundService continues running after Vscode debugging ends

I am currently testing my Flutter app on a physical Android device by running it using Vscode's Start debugging command. The Flutter app starts running a FlutterBackgroundService using final service = FlutterBackgroundService(); await…
gameveloster
  • 901
  • 1
  • 6
  • 18
0
votes
0 answers

Flutter Background Service not Stopping when App is removed from Task Manager

After starting the background service and removing the app from the task manager.After again opening the app and trying to stop the service using the button. It does not work. Although It Shows the Service is Running. I have also tried using…
Amarjeet Patidar
  • 496
  • 1
  • 4
  • 9
0
votes
0 answers

How to use flutter_background in my flutter app?

I want to make an alarm app that makes my phone vibrate when my backpack is far away from me using RSSI. But, my app doesn't want to run when my phone is turned off. I already searched many websites but I couldn't find an article that teaches me to…
0
votes
0 answers

Flutter GetStorage().read('userData') returns null when call in onStart() method of flutter background service when app launches for the first time

GetStorage().read('userData'); returns null when I try to read it onStart method of flutter background service package. I am using flutter background service package to to run background tasks even when application is in terminated state. I am using…
0
votes
0 answers

Is Socket io client working in flutter background to implement custom notifications?

I have flutter project for chat - like WhatsApp- I'm using node.js with socket in server and using socket_io_client in the app, everything works good, but if the app is closed the socket doesn't work, now I want to use notifications in the app, I'm…
alnajm
  • 335
  • 1
  • 2
  • 14
0
votes
0 answers

I am unable to upload images in background in IOS using WorkManager in Flutter

I am unable to upload images in background in IOS using WorkManager in Flutter. First It is taking approx 40-50 minutes to execute also it crash on http.post method This is my Code Workmanager().registerOneOffTask("task-identifier",…
0
votes
0 answers

Current location while in background using GeoLocator

I am using GeoLocator package (version 9.0.2). I am able to get the location as long as the app is in foreground with the permission set to "While Using the App". As soon as the app goes in the background the location stops working and I get the…
Saad Bashir
  • 4,341
  • 8
  • 30
  • 60
0
votes
1 answer

Timer is not accurate when app is in background for too long

I was able to successfully implement a countup timer using Timer.periodic(). If I switch between apps or take the app in the background for 30 seconds, current duration of the timer is still accurate. However, if app is in the background for more…
nerdy kid
  • 371
  • 1
  • 3
  • 14
0
votes
0 answers

How to insert data into local storage, when a local notification is shown?

I'm working on an app that allows users to set reminders, which basically schedules local notifications. I have a feature in my app, that requires adding some data into the local database, whenever a notification is fired. Let's say, a notification…
1
2