background-process

How to keep an iPhone app running on background fully operational

半腔热情 提交于 2019-11-26 05:21:54
问题 first of all, I know there is only support for voip, audio and location apps to run in background and that they will run just while the audio is been played or while using location services, etc. What I want to know is if there is a way to keep my app running on background fully operational, doesn\'t matter the impact on battery\'s life. That way the user of my app can select from settings to keep alive the app whenever he wants and just for the amount of time he wish. e.g if he is waiting

Detecting the call events in ios

a 夏天 提交于 2019-11-26 04:55:43
I am new to ios. I was wondering if there is any way to detect the call events like incoming call, outgoing call even if my app is not in foreground. And if yes it is possible then can i read the details about that call like duration, whether it is missed, dialed or recieved. Thanks in advance. Yes you can detect a Call. but only if your app is running in the foreground. For this you can use the Core Telephony Framework . If your app will fall in any of the background running categories (VOIP, AUDIO, Location tracking or accessory ) you might be able to use the CTCallCenter in the background.

iOS application executing tasks in background

南笙酒味 提交于 2019-11-26 04:39:16
问题 I was wondering if I could send some webservice calls while my application is in the background. How does skype do it? Even if I press the home button my call stays connected. 回答1: Building on what rckoenes stated, applications are allowed to register background tasks to be completed after the user hits the home button. There is a time limit of 10 or 15 minutes for these tasks to complete. Again, you can register a task to complete immediately after the user hits home, this does NOT allow you

How to prevent a background process from being stopped after closing SSH client in Linux

可紊 提交于 2019-11-26 03:14:19
问题 I\'m working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file. To my surprise, that doesn\'t work. As soon as I close the Putty window, the process is stopped. How can I prevent that from happening?? 回答1: Check out the "nohup" program. 回答2: I would recommend using GNU Screen. It allows you to disconnect

Background timer task in JSP/Servlet web application [duplicate]

£可爱£侵袭症+ 提交于 2019-11-26 02:09:55
问题 This question already has answers here : How to run a background task in a servlet based web application? (5 answers) Closed 4 years ago . I want to retrieve from subscription and store feeds to DB from subscription after every 6 hours. I want to have a timer thread in background to accomplish this task. What\'s the best way? A normal timer thread or Quartz API? 回答1: To start, I wouldn't use JSP for this. There it is not for. When you're on Java EE 5, use the container-provided jobscheduling

Detecting the call events in ios

帅比萌擦擦* 提交于 2019-11-26 01:54:20
问题 I am new to ios. I was wondering if there is any way to detect the call events like incoming call, outgoing call even if my app is not in foreground. And if yes it is possible then can i read the details about that call like duration, whether it is missed, dialed or recieved. Thanks in advance. 回答1: Yes you can detect a Call. but only if your app is running in the foreground. For this you can use the Core Telephony Framework. If your app will fall in any of the background running categories

How to get PID of background process?

对着背影说爱祢 提交于 2019-11-26 01:11:59
问题 I start a background process from my shell script, and I would like to kill this process when my script finishes. How to get the PID of this process from my shell script? As far as I can see variable $! contains the PID of the current script, not the background process. 回答1: You need to save the PID of the background process at the time you start it: foo & FOO_PID=$! # do other stuff kill $FOO_PID You cannot use job control, since that is an interactive feature and tied to a controlling

How to run Node.js as a background process and never die?

笑着哭i 提交于 2019-11-25 23:25:57
问题 I connect to the linux server via putty SSH. I tried to run it as a background process like this: $ node server.js & However, after 2.5 hrs the terminal becomes inactive and the process dies. Is there anyway I can keep the process alive even with the terminal disconnected? Edit 1 Actually, I tried nohup , but as soon as I close the Putty SSH terminal or unplug my internet, the server process stops right away. Is there anything I have to do in Putty? Edit 2 (on Feb, 2012) There is a node.js

How do I get a background location update every n minutes in my iOS application?

筅森魡賤 提交于 2019-11-25 22:26:21
问题 I\'m looking for a way to get a background location update every n minutes in my iOS application. I\'m using iOS 4.3 and the solution should work for non-jailbroken iPhones. I tried / considered following options: CLLocationManager startUpdatingLocation/startMonitoringSignificantLocationChanges : This works in the background as expected, based on the configured properties, but it seems not possible to force it to update the location every n minutes NSTimer : Does work when the app is running

How to run a background task in a servlet based web application?

孤街醉人 提交于 2019-11-25 21:47:41
问题 I\'m using Java and I want to keep a servlet continuously running in my application, but I\'m not getting how to do it. My servlet has a method which gives counts of the user from a database on a daily basis as well as the total count of the users from the whole database. So I want to keep the servlet continuously running for that. 回答1: Your problem is that you misunderstand the purpose of the servlet. It's intented to act on HTTP requests, nothing more. You want just a background task which