background-process

Get updates from a server in the background using Pull notification - Android

巧了我就是萌 提交于 2019-12-10 21:07:05
问题 I want to implement a feature in an android app, which periodically pulls information from a server even when the app is in the background / not running. It should invoke a web service and check for updates at least 3-4 times in a day, and if available pull and show them in the notification bar. When the user clicks on the notification it should open up the app screen. Is that feasible using pull notification technology? Are there any constraints? Can you share some tutorials that will help

Best Practices for developing an Activity with a background Service

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 18:27:04
问题 My Application has an Activity for the UI and a Service for background polling fun. Seems like standard fare. Can AlarmManager trigger the Service Intent without Activity OnCreate being called? Is there any benefit to putting the Activity & Service into different Applications? Would this create 2 apk's and make it impossible to put into Market as one app? Can you put 2 applications into one manifest somehow? Regarding communication between the two: -If Activity & Service are part of the same

Run a background job from Gradle

自闭症网瘾萝莉.ら 提交于 2019-12-10 14:55:38
问题 I've created a task starting a remote job like task mytask(type: Exec) { commandLine 'ssh' args '-f -l me myserver ./start'.split(' ') } and it works, however, it seems to wait for the job to terminate. But it never terminates and it shouldn't. Doing the same from the command line works: Because of the -f switch the ssh command gets executed in the background. I've tried to add '>&' /dev/null (csh stdout and stderr redirect) to the command line, but without any success. Also the obvious & did

Perform Background task in java

 ̄綄美尐妖づ 提交于 2019-12-10 12:10:13
问题 Just like we have AsyncTask in android , what options do we have in Java to perform task running in background(different Thread) and as well communicate with the main Thread easily . I have found things like 1.Worker Threads and 2.swing workers please let me know if these are the correct classes to do such work , as well what else i can use to do above mention work 回答1: For multi-threading/tasking in general, Java has terrific concurrency support. Check out java.util.concurrent. And to

Command 'exit' doesn't work when some background process is still piping out

允我心安 提交于 2019-12-10 11:57:35
问题 The 'exit' command doesn't work for my case, and I don't get it why: ssh user@mysever <<'HEREDOC' echo "1. Running PM2 log..." pm2 log & echo "2. PM2 log is now in background" exit echo "3. Won't be here" HEREDOC echo "4. Out." I can't terminate the ssh pipeline, even with the 'exit' command above. I can see the first echo, second echo; no third echo of course; and stuck. I expected the behaviour that I can see the fourth echo. I have to press Ctrl+C, and I see the 4th echo after that. 回答1:

Need complete Data protection while Core Data processing is in background

ぃ、小莉子 提交于 2019-12-10 11:35:36
问题 I am just stuck in the middle of the project. My objective is to protect my data . I have gone through Nickharris blog regarding (Core Data and Enterprise iPhone Applications – Protecting Your Data) But in the conclusion it is clearly mentioned that: If your application needs your Core Data store in any background processing , then you cannot use data protection . Any attempt to access files that are NSFileProtectionComplete will cause an exception . And I am using core data in background

How to start GPS tracking triggered by a iBeacon in Xamarin iOS?

房东的猫 提交于 2019-12-10 11:09:34
问题 I am working on an app that records journeys by tracking the GPS. Everything is working fine in background if we start the process from the foreground (by tapping the button "Start Journey"). Now the idea is start record these journeys automatically triggered by a iBeacon. When the iPhone gets inside of a beacon region, the app is detecting this and calls the function LocationManager.StartUpdatingLocation(); PROBLEM: Using iBeacons from background, we only get 10 seconds ranging and that is

Running PuTTY -m in background (no window wanted)

删除回忆录丶 提交于 2019-12-10 09:51:37
问题 I am running PuTTY from a Perl script using the system command (Windows 7). I use the -m command line option and it works great, but I do not want a window popping up. It's a short lived session, so it is annoying having the window open up for a second to make the connection and then close. I searched "windows background" "putty background" and many other variations. I got close but no cigar. The thread "Run putty jobs...MATLAB" Was oh so close, but I was already doing that. 回答1: You cannot

backgroundTaskHost.exe exits with code 1 (0x1)

巧了我就是萌 提交于 2019-12-10 04:19:23
问题 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

Run atexit() when python process is killed

和自甴很熟 提交于 2019-12-09 17:33:10
问题 I have a python process which runs in background, and I would like it to generate some output only when the script is terminated. def handle_exit(): print('\nAll files saved in ' + directory) generate_output() atexit.register(handle_exit) Calling raising a KeyboardInterupt exception and sys.exit() calls handle_exit() properly, but if I were to do kill {PID} from the terminal it terminates the script without calling handle_exit(). Is there a way to terminate the process that is running in the