background-process

iOS swift streaming app does not play music in background mode

醉酒当歌 提交于 2019-12-23 11:47:40
问题 My app is running fine but as soon the screen safe is on or the doing something else on the iphone the stream stops. I activated the background modes "is playing audio" but it does not helps. This is my ViewController.swift import UIKit import MediaPlayer class ViewController: UIViewController { let player: MPMoviePlayerViewController = MPMoviePlayerViewController(contentURL: NSURL(string: "http://url to my stream")) override func viewDidLoad() { super.viewDidLoad() // Do any additional setup

Controller Action to Delayed Job

白昼怎懂夜的黑 提交于 2019-12-23 09:07:44
问题 I am uploading a tab-delimited document and processing in the controller. Everything works fine, but can take some time on a large file. I want to move this to a delay_job, which I have working elsewhere in my app, but as this is in the controller, cannot be called in the same way. The form calls on the process_file action, which in turn calls on the salesupload action. How should I turn this into a background job? class SalesController < ApplicationController def salesupload(file) uploaded

I want to detect whether or not a user has been active in the past 10 minutes using a batch file or some background process

时光总嘲笑我的痴心妄想 提交于 2019-12-23 06:14:12
问题 I've never worked with batch files before, but the idea behind this is that I want to simply run a program after I've been inactive for a certain period of time. It doesn't matter which program, I just want it to run concurrently with my screensaver for some lighting effects with my keyboard. I suppose another solution would be to detect whether the screensaver is running or not and start on that condition as well, I just have no idea where to begin with this one, but am willing to learn. 回答1

Prevent my application from being suspended in background mode? [duplicate]

落花浮王杯 提交于 2019-12-23 04:33:27
问题 This question already has answers here : Is there a way to prevent iOS6 to kill the specific task process? (2 answers) Closed 6 years ago . My application is suspended by iOS after some time -- from one hour to several days -- but I want it to work in the background as long as possible (maybe infinitely) while the device is running. SMS will notify the user all the time that the device is running -- iOS doesn't kill the SMS service. My app has similar functionality and should notify user

trigger a script when mailbox recieves mail?

我怕爱的太早我们不能终老 提交于 2019-12-23 01:44:06
问题 I want to process a particular mailbox when it receives mail, I know I could have cron check every n minutes for any mail, but wondering if there's a way to "listen" for mail rather than continually polling. 回答1: Try a .forward file You can pipe the message into any program or script you want, but also check if procmail can do what you want. 回答2: Depending on your mail server, it may be possible to actually have any incoming message be delivered to a process. Either in a .forward or by

Using another thread for “networking” , in Android

♀尐吖头ヾ 提交于 2019-12-22 18:13:18
问题 I am developing an Android application and when it launches : 1) I make an HTTP Request to my server to send a small JSON file. 2) Open a webView to show a URL. When the server is running properly there is absolutely no problem and everything goes smoothly. HOWEVER , if for any reason the server is down , the HTTP request literally hangs and i need to wait till there is an HTTP timeOut which is around 30seconds till i actually see the webView with the URL loading. I read that i shouldn't make

Accessing a WPF FlowDocument in a BackGround Process

核能气质少年 提交于 2019-12-22 16:15:37
问题 Accessing a WPF FlowDocument in the BackGround My question relates to accessing a UI object, in the background in WPF. I have seen dozens of sample apps, that all are simple, easy to follow, and 95% of which tell you how display a progress bar. That’s not quite what I want….. My problem is this: I want to perform a long task (or many long tasks) by accessing a FlowDocument in a RichTextBox. The exact task isn’t relevant here, but an example might be to scan through the document, and count the

Accessing a WPF FlowDocument in a BackGround Process

久未见 提交于 2019-12-22 16:12:13
问题 Accessing a WPF FlowDocument in the BackGround My question relates to accessing a UI object, in the background in WPF. I have seen dozens of sample apps, that all are simple, easy to follow, and 95% of which tell you how display a progress bar. That’s not quite what I want….. My problem is this: I want to perform a long task (or many long tasks) by accessing a FlowDocument in a RichTextBox. The exact task isn’t relevant here, but an example might be to scan through the document, and count the

Accessing a WPF FlowDocument in a BackGround Process

▼魔方 西西 提交于 2019-12-22 16:12:04
问题 Accessing a WPF FlowDocument in the BackGround My question relates to accessing a UI object, in the background in WPF. I have seen dozens of sample apps, that all are simple, easy to follow, and 95% of which tell you how display a progress bar. That’s not quite what I want….. My problem is this: I want to perform a long task (or many long tasks) by accessing a FlowDocument in a RichTextBox. The exact task isn’t relevant here, but an example might be to scan through the document, and count the

Initiating Non-waiting Background Process in Perl

拜拜、爱过 提交于 2019-12-22 15:52:21
问题 I have a Perl script that needs to kick off another process in the background and exit without waiting for the other script to finish. There are lots of threads on StackOverflow that cover how to wait in Perl or how to not wait for other programming languages, but I can't seem to find the right answer for Perl. I've read up quite a bit and thought I was doing the right things but none of my attempts seem to be working correctly. Here are all the variations I've tried so far to no avail: