Questions tagged [background-task]

677 questions
5
votes
3 answers

Windows Phone 8.1 background task closes before completion

My background task takes a long time to complete, and the OS is just killing it. I'm trying to sync my contacts online, here's what I'm doing: Get all contacts from phonebook (takes ~1 second) Upload them to a server (~2 seconds) Retrieve all…
bogdanbujdea
  • 594
  • 8
  • 22
5
votes
1 answer

HostingEnvironment.QueueBackgroundWorkItem uses ASP.Net thread pool or another thread pool?

I have an ASP.Net app, in which a background task runs using HostingEnvironment.QueueBackgroundWorkItem as in code below. Question: Will the background task scheduled in code below, use a thread from the ASP.Net thread pool thread, or will it use a…
Sunil
  • 20,653
  • 28
  • 112
  • 197
4
votes
1 answer

SwiftUI and .backgroundTask(.appRefresh(..)) not working

Using iOS16.1, Swift5.7.1, XCode 14.1, My SwiftUI App shall be pimped with some background work done. First question: Is it correct that periodically occurring background-work can only be done if the App is still running (i.e. if the app is not…
iKK
  • 6,394
  • 10
  • 58
  • 131
4
votes
1 answer

React Native expo-location: How to make the background location service update more often?

I'm building a sports app with Expo / React Native and trying to figure out a good way to track user location while the app is in the background. I have built a solution with expo-location…
4
votes
2 answers

How to execute some code at last retry of a Celery task

I am using Django with Celery to run my background tasks. I have a task that can fail for some IO reasons: @shared_task(bind=True) def mytask(self, someargs): try: do_some_io_operation() except SomeException as e: …
Martin Faucheux
  • 884
  • 9
  • 26
4
votes
0 answers

iOS 13 Background Tasks not working when App terminated?

i'm trying to get the new BackgroundTask framework to work in my app. I'm testing on a real device running iOS 13.4. Everything works as expected (minimal setup, like is described here:…
Thieri
  • 203
  • 1
  • 10
4
votes
2 answers

Android Job Scheduler Job does not execute after app is closed

My Job executes perfectly if the app is open but if i close the app the jobservice is never executed. I have followed the tutorial here; Job Scheduler - Code In Flow and it just does not run (or maybe it runs and we do not know it runs?). I have put…
4
votes
0 answers

Android schedule task to execute at specific time daily in android 9

I want to trigger a notification at 8:OO AM daily. Alarm manager is not working from android 9. I tried with work manager also but it's not working. Currently am using alaram service, its working fine upto andorid 8 version, but not in 9. Intent…
RK191
  • 51
  • 4
4
votes
2 answers

Why backgroundTimeRemaining gives DBL_MAX even if application state is UIApplicationStateBackground?

I am logging (writing into file) backgroundTimeRemaining value each time my app is awoken from a suspended mode, right before I begin UIApplication's background task with expiration handler, like this (inside my method which makes a network…
Whirlwind
  • 14,286
  • 11
  • 68
  • 157
4
votes
2 answers

WKWatchConnectivityRefreshBackgroundTask is never triggered in background, but WKSnapshotRefreshBackgroundTask

I want to update my watch app state in background from iPhone, using session.updateApplicationContext(applicationContext). Sending an application contact while the app on the watch is active does work properly. When I activate the home button on…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
4
votes
1 answer

Prevent termination of UWP app on relaunch

We have a UWP app, which has 3 registered background tasks, one is an app-trigerred task which keeps running in the background until failure. The approach is to restore the last saved state which is kept within the background processor object, that…
Kushonoha
  • 196
  • 2
  • 15
4
votes
1 answer

How to run some code every day at midnight in background in UWP?

I think the title is self explanatory: I struggle to fire a background task every day, at midnight for example. The task is registered properly with a TimeTrigger, added to the Manifest but the result varies, sometimes it fires only on phone,…
Junpei Kun
  • 653
  • 8
  • 11
4
votes
1 answer

Job Scheduling setRequiresDeviceIdle(true) and setPeriodic() not working

I am working on app that do the background task after 10 second and check whether device is idle or not but some how It fires every 10 second without checking Device is idle or not. MainActivity.java private static final int JOB_ID = 1; …
Piyush k
  • 297
  • 3
  • 14
4
votes
1 answer

Background task on remote notification suspended after a short while

I am using remote notification with content-available: true flag to launch the app in the background on silent push notification and process or fetch updates from remote API. The code executes fine when the app is in the foreground, or in suspended…
Martin Koles
  • 5,177
  • 8
  • 39
  • 59
4
votes
1 answer

How to keep Webview running as a BackgroundTask C# UWP Windows 10

I am creating a WebView in my C# code and Navigate it to a URL that is streaming music, when I click myPlayButton, without displaying the WebView in my UI. And it's playing the streamed music very well. But when the app get suspended (minimized),…
1 2
3
45 46