background-task

How to perform a simple background task on Xamarin iOS

感情迁移 提交于 2021-02-10 20:25:15
问题 In our app users can track and submit journeys they have recorded. I need a simple way of creating a task in iOS. I have already created and tested this on Android. It works via: The user selects the journeys they would like to submit. Taps sync and a foreground service is created that syncs the journeys to our API. This service will continue to sync journeys even if the app is put into the background or even closed. So in short how can i achieve this on iOS 9-13? I have already tried

How can I import background from background_tasks in django. method gives error

房东的猫 提交于 2021-01-29 10:11:50
问题 I want to use django background-task but from background_task import background gives error How can I remove this error from my code. So far I have followed the documentation and have implemented this. views.py from background_task import background @background(schedule=60) def main(request): # First we have to create our client client =RestApiClient(version='9.0') settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib

iOS 13 - Using BGTaskScheduler doesn't work all the time

天涯浪子 提交于 2020-05-29 04:04:53
问题 THE PROBLEM: I want to run a simple function, 5 seconds after app goes into background. I had to implement BGTaskScheduler, to support iOS 13. The old implementation for BackgroundTask works for me on older iOS versions. I added background modes as requested (BLE accessories is ticked because we perform a small BLE operation in this function): Then, I prepared the Info.plist according to the docs ( Identifier is fake just for StackOverflow question): Before didFinishLaunchingWithOptions is

How to initialize repeating tasks using Django Background Tasks?

别来无恙 提交于 2020-02-02 06:58:52
问题 I'm working on a django application which reads csv file from dropbox, parse data and store it in database. For this purpose I need background task which checks if the file is modified or changed(updated) and then updates database. I've tried ' Celery ' but failed to configure it with django. Then I find django-background-tasks which is quite simpler than celery to configure. My question here is how to initialize repeating tasks? It is described in documentation but I'm unable to find any

Run Background Task Indefinitely in UWP

ぐ巨炮叔叔 提交于 2020-01-03 05:04:08
问题 I have a requirement to constantly poll an API and provide notifications in UWP app irrespective of whether it is Visible to user OR minimized OR Not in focus OR Suspended . If I choose to write it in the app itself, it stopped working while app is suspended and resumed while again app is opened or kept in focus. So I chosen Background Task so that it runs everytime even when app is suspended (ex: minimized). But now any background task is limited to short span of 30secs and if it is

Windows Phone 8.1 Background Task - Can't Debug and won't fire

此生再无相见时 提交于 2019-12-29 07:17:35
问题 Im having a issue with the Background Tasks in WP8.1 I have created a background task as a windows runtime component following this tutorial : http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh977055.aspx The problem is, i can't get my background task to run. It runs onNetworkChange. When i can to flight mode and back it is not firing. When i go to lifecycle events in the Debug Location toolbar it says No Background tasks. I have debugged the code that registers the background task

C# W10 UWP BackgroundTask StorageFile

左心房为你撑大大i 提交于 2019-12-25 14:05:08
问题 I'm trying to set an image to lockscreen or wallpaper in my C# W10 UWP app in a BackgroundTask ... I can do this just fine in normal execution, but when I put the same code into a BackgroundTask , the code hangs at StorageFile.CreateStreamedFileFromUriAsync . // See if file exists already, if so, use it, else download it StorageFile file = null; try { file = await ApplicationData.Current.LocalFolder.GetFileAsync(name); } catch (FileNotFoundException) { if (file == null) { Debug.WriteLine(