background-process

backgroundTaskHost.exe exits with code 1 (0x1)

蹲街弑〆低调 提交于 2019-12-05 05:40:57
I have a Windows Store application that I am creating that has a Windows Runtime Component for a background task. The solution builds with no problems in Visual Studio but when the background task is triggered, it always fails with the message "The program '[4204] backgroundTaskHost.exe' has exited with code 1 (0x1)." The reference to the project containing the background task is in the main project and I am setting the entry point, so I don't know what the problem is. How do I get more information as to why the program is exiting? I was calling an an asynchronous method that returned void. I

NSURLSession background upload not working

对着背影说爱祢 提交于 2019-12-05 03:13:24
I'm trying to upload a series of files from iPhone up to a server, with the intent that the upload of these files happen even when the App is in the background or suspended. I'm using background transfer provided by NSURLSession and its series of APIs. what was odd was it it was fully working 2 weeks ago . As in: I would click the "upload" button on the UI files would start to appear one by one on my server I tap the "Home" button on the iPhone to make the app go into the background Files would continue to upload to the server until it all completes Last couple of days, I've been doing some

How can I keep my app running in the background?

限于喜欢 提交于 2019-12-05 02:48:38
问题 I am creating an application in which I need to always be connected via a TCP socket. My application already works well in terms of the connection, but when it gets sent to the background, the android system eventually kills the process. This causes it to become disconnected from the server. I've been looking for a way to always keep the application alive, but haven't found anything. Could someone tell me what would be the best way to make it so that my application is not closed when it's in

How to make shell exec run in background while php continues

自作多情 提交于 2019-12-05 02:25:19
I have ffmpeg doing a video conversion in a PHP file and it works as it should. The problem is it takes up to a minute for this to finish. I thought it might be easy to do but I can only get it to work in the background when I use just one command (eg single pass conversion without mp4box) like this exec("nohup " . $ffmpegPath . " -i " . $srcFile . " -f mp4 -vcodec libx264 -crf 27 -s " . $srcWidth . "x" . $srcHeight . " -an -r 20 " . $destFile . ".mp4 > /dev/null 2>&1 &"); The problem is I need to use three different commands to do a proper conversion though. So far my commands look like this

App restarts when woken from background

断了今生、忘了曾经 提交于 2019-12-05 02:04:14
问题 G'day iOS Guru's, I have searched extensively for an answer, but can't find one (I bet the first response to my question will be to another similar question, but I cant find it). Anyway, my problem is that I am running a simple map app that the user can drop pins on the map with a customised circle overlay around the dropped pin. When the app goes into the background (iphone locked or home button pressed), if I re-enter the app within ~ 5 mins, the pins are still there and the app reopens to

NSURLSession post : difference between uploadTask and dataTask

谁都会走 提交于 2019-12-05 00:45:21
These are my two examples : let config = NSURLSessionConfiguration.defaultSessionConfiguration() config.HTTPAdditionalHeaders = ["Accept": "application/json", "Content-Type": "application/json", "User-Agent": UIDevice.currentDevice().model] var request = NSMutableURLRequest(URL: NSURL(string: "http://XXX")) request.HTTPMethod = "POST" let valuesToSend = ["key":value, "key2":value] var error: NSError? let data = NSJSONSerialization.dataWithJSONObject(valuesToSend, options:NSJSONWritingOptions.PrettyPrinted, error: &error) request.HTTPBody = data if error == nil { let task = NSURLSession

Downloading in background and waking app when finished

房东的猫 提交于 2019-12-04 21:42:27
I use URLSession configured as background session to download some files. When download finishes I use: func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) to move downloaded file. Everything works fine, except that when app is in the background this function is not being called. It's called right after app is restored to foreground, but I would like the system to wake my app after file is downloaded. Is there some way to do this? There is indeed :) You probably need to change a few things in your setup. First the

How to make an android app run in background when the screen sleeps?

夙愿已清 提交于 2019-12-04 20:13:01
I am developing a Tracking app, which keeps tracks of the user by getting his current location for every 3 secs. I am able to fetch the lat long values when the screen is on. but when the screen sleeps. i am unable to fetch the datas. CODE: @Override public void onLocationChanged(Location location) { mLastLocation = location; if (mCurrLocationMarker != null) { mCurrLocationMarker.remove(); } latitude = location.getLatitude(); longitude = location.getLongitude(); latLngcurrent = new LatLng(location.getLatitude(), location.getLongitude()); Toast.makeText(context,String.valueOf(latitude)+" "

How to reboot CoreBluetooth manager instance at fixed interval in background

我的未来我决定 提交于 2019-12-04 18:27:51
I'm developing a iOS application of using CoreBluetooth and i have one problem in application BackGround. Generally, iOS application can't run long-term in Background. (e.g. pushing HomeButton. switching other application) But my application is set "Uses Bluetooth LE accessories" as BackGroundMode, so i can monitor region in Background. And i implemented startRangingBeaconsInRegion in didEnterRegion. When enter a region, Ranging region will be started and will be stopped after about 10 sec by iOS. But i want to always use ranging in Background. Because my app use only one UUID for detecting

iPhone VOIP in background

六月ゝ 毕业季﹏ 提交于 2019-12-04 18:18:52
I am developing an iPhone application that communicates with a non iOS device through Wi-Fi. My application is using VOIP.I have configured the streams and added the necessary UIBackgroundModes into my plist . The problem is that the application is not receiving any information from the external device, When it enters in background. Could somebody tell me if I am missing something? Divyang Mithaiwala Not sure about actual problem. Make sure following As per iOS background VOIP application it will allow only TCP connection to be alive & communicable in background. So if you/your stack use UDP