background-task

Universal Windows App Background Task “has exited with code 1 (0x1)”

∥☆過路亽.° 提交于 2019-12-25 06:29:12
问题 Scratching my head on this one. I've got a background task in my UWP application which is registered to run every 15 minutes (using TimeTrigger ) and whenever the internet becomes available (using a SystemTrigger ). I know for a fact that these are registered correctly as both appear in the "Lifecycle Events" when debugging using visual studio. Nevertheless, my code for registering them is below: bool registered1 = false; bool registered2 = false; foreach (var task in

Django + background-tasks how to initialize

非 Y 不嫁゛ 提交于 2019-12-24 23:42:52
问题 I have a basic django projects that I use as a front end interface for a (Condor) computing cluster for generating simulations. From the django app the users can start simulations (in Condor). The simulation related meta-data and the simulation state are kept in a DB. I need to add a new feature: notification when (some) simulations are done. Since I want a simple solution (and I already using background tasks) I was thinking to use repeating task that at fixed intervals query Condor about

Can not call Task.Run() at backgroundTask

泄露秘密 提交于 2019-12-23 17:33:50
问题 I want to do something in thread at background task, so I tried using Task.Run() but it does not work. Anyone can show me another way to create thread in background task. This is my code: public sealed class KatzBackgroundTask : IBackgroundTask { public void Run(IBackgroundTaskInstance taskInstance) { RawNotification notification = (RawNotification)taskInstance.TriggerDetails; string content = notification.Content; System.Diagnostics.Debug.WriteLine(content); testLoop(); } async void testLoop

SWIG - C# Calling from UWP Background Task or Extended Execution

那年仲夏 提交于 2019-12-23 04:43:47
问题 I wonder if anyone has tried calling a swig C# wrapper around a C++ library from a UWP Background Task, Extended Execution, or Activation Trigger? My C# swig wrapper provides functionality written in C++ which handles network calls to services such as cloud etc. It might download or upload files such as documents, images, etc or it might just synchronize them with local on machine copies. I have been doing lots of reading/research lately on the topic of Background Activation and Foreground

Background transfer download task failed when app was closed

我的梦境 提交于 2019-12-22 11:20:02
问题 I have created background nsurlsession to perform download task. It worked well when the app was in background. However, download task seems to be canceled and failed when I closed the app (double click "Home" button and swipe up), and it made me to download from the beginning again when I relaunched the app. According to Apple document, background transfer works even the app is no longer running. Am I doing anything wrong? 回答1: From the NSURLSessionConfiguration Class Reference: If an iOS

Native images generated against multiple versions of assembly System.Net.Http

大憨熊 提交于 2019-12-22 11:04:23
问题 I have Windows Phone Silverlight 8.1 application which is using BackgroundTask project for WNS and timer tasks. I`m getting following error on calling some method from BackgroundTask project: ERROR: Native images generated against multiple versions of assembly System.Net.Http. Does anyone have some idea where can be problem? 回答1: I found a problem: I have Windows Phone Silverlight 8.1 main project (converted from WP8 for IBackgroundTask support) referenced to DAL project (WP Silverlight 8.1).

iOS background task using NSURLSessionDataTask

寵の児 提交于 2019-12-22 00:40:39
问题 I have flight search feature in my application which is taking too long to get the data (more than 25 seconds). if application goes background or went to sleep mode, internet connection get disconnected. I have written below logic using apple example to make api request keep going even though if app goes to background but it's not working. self.session = [self backgroundSession]; self.mutableData = [NSMutableData data]; NSURL *downloadURL = [NSURL URLWithString:@"http://jsonplaceholder

Redirect to action after finishing background task queue

佐手、 提交于 2019-12-20 06:23:03
问题 I'm working on a .Net core solution that takes backup of storage files from another microservice and because this process takes too long time, we decided to build this routine under a background task.By following this link: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-2.1 I have implemented the background by using Queued background tasks like the following : public interface IBackgroundTaskQueue { void QueueBackgroundWorkItem(Func

Will ios terminate the app running in background after a specific time?

半城伤御伤魂 提交于 2019-12-18 13:32:09
问题 I am using core location framework inside my application and I set the location string in UIBackgroundMode or Required background modes(in Xcode 4.2) for getting the updated location from didUpdateToLocation method when app is running in background and also sending this updated location to server by hitting the specific link inside didUpdateToLocation method of core location framework. My question is that will the app be terminated after some time when running in background or not? 回答1: No,

Watchkit , openParentApplication with WatchKit Extension

孤街浪徒 提交于 2019-12-17 06:57:50
问题 First times doesn't work "Null" ( before open App in iPhone ) and some times doesn't work but i want one loop or timer for repeat this request for get result : here is my code - (void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *))reply { // Temporary fix, I hope. // -------------------- __block UIBackgroundTaskIdentifier bogusWorkaroundTask; bogusWorkaroundTask = [[UIApplication sharedApplication]