background-process

How to keep GPS app running in background without pauses

给你一囗甜甜゛ 提交于 2019-11-30 10:39:45
I have a problem keeping the GPS running in background. I succeded to keep the GPS running when the app is in background, but it stops sometimes. I noticed that it stops when i enter in a building and i stay there for 2-3 hours. "Stops" means that i don't receive any GPS point even though the location service icon is still on. Then when i get out i don't receive any points until I bring my application to foreground. I set the pausesLocationUpdatesAutomatically property to NO. So, everything works fine until i get into a location with weak gps signal. When i get out of that area i don't receive

Have a background process running continously on an MVC4 website

懵懂的女人 提交于 2019-11-30 10:35:30
I have an ASP.NET MVC4 website running and now i need some sort of background task that is continously running. But is this even possible? The MVC4 website is a sort of notifying system. Other websites can register a Callback URL on this website and this website should trigger that callback URL for a specified interval. So, for every hour for example. Normally the code of my website only becomes active when I visit a page. But in order to make this work I need a way to have my ASP.NET website to run in the background continously. So it can do its checks and make an HTTP call when necessary. It

Continue countdown timer when app is running in background/suspended

不问归期 提交于 2019-11-30 10:12:00
I have a functional countdown timer. The problem is that I need to continue the countdown when the user puts the app in the background. Or suspends the app? I am not sure what the correct terminology is to describe this action. In other words, the user opens the app and starts the countdown. The user should be able to use other apps but the countdown still operate. Also, the countdown should be able to run forever until it finishes or when the user terminates running the app. Here is the code for my timer: class Timer{ var timer = NSTimer(); // the callback to be invoked everytime the timer

UIApplicationBackgroundRefreshStatusDidChangeNotification usage without corresponding delegate method

非 Y 不嫁゛ 提交于 2019-11-30 10:11:48
I feel that UIApplicationBackgroundRefreshStatusDidChangeNotification introduced in iOS 7 is of little use without supporting UIApplication delegate method. Because, the app is not notified when user has switch ON the background refresh state for my app. This is my notification handler... - (void)applicationDidChangeBackgroundRefreshStatus:(NSNotification *)notification { NSLog(@"applicationDidChangeBackgroundRefreshStatus with notification info = %@ and refresh status = %d", notification, UIApplication.sharedApplication.backgroundRefreshStatus); if (UIApplication.sharedApplication

How to send emails using PHPMailer in the background?

試著忘記壹切 提交于 2019-11-30 09:36:21
PHPMailers is doing a fine job in sending emails from a gmail account. But it takes quite a bit of time, and the page won't show the response until the email has been sent. Any ways to send the email in the background so that I can provide a better user experience to the user? Thanks! Rafa The use of an email queue and php exec() is one of the best ways. It will trigger when needed (avoiding the use of CRONs), it's fast because it is called backgrounded, and immediate. 1. Email queue. Take all fields in a table's MySQL with an insert, something like: $queryIN="INSERT INTO email_queue (date

delayed_job not logging

青春壹個敷衍的年華 提交于 2019-11-30 08:36:21
问题 I cannot log messages from my delayed_job process. Here is the job that is being run. class MyJob def initialize(blahblah) @blahblah = blahblah @logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log')) end def perform @logger.add Logger::INFO, "logging from delayed_job" #do stuff end end I've tried various logging levels, and I have config.log_level = :debug in my environment configuration. I run delayed_job from monit. I'm using delayed_job 3.0.1 with ruby 1.9.3 and rails 3.0.10.

is it possible to close apps programatically which are running in background in android? [duplicate]

人走茶凉 提交于 2019-11-30 07:42:57
问题 This question already has an answer here : How do task killers work? (1 answer) Closed 5 years ago . I want to stop or close apps which are running in background in android. Is it possible? If so how to achieve this. Refer any links will be appreciated. Thanks in advance.. 回答1: You can use Process.killProcess(int pid) to kill processes that have the same UID with your App. You can use ActivityManager.killBackgroundProcesses(String packageName),with KILL_BACKGROUND_PROCESSES permission in your

Periodic background synchronization

跟風遠走 提交于 2019-11-30 07:25:52
Im quite new to iOS programming and now want to implement a periodic background synchronization to synchronize my server data with client data. What I want to achieve is comparable with Androids SyncAdapter where you can define a time interval (for example each 30 minutes) and the system will trigger the defined task automatically in the background. Until now I could not find such mechanism for Swift 3.0 so I need to ask if somone has experience or some hints for me how I can achieve this. What I want to do sounds quite simple: When the app starts for the first time the app should setup a sync

Background Key Press Listener

纵然是瞬间 提交于 2019-11-30 07:16:08
问题 I've got a simple window form application that turns on capslock when I press space and turns it off if I press a letter. Problem is that I have to focus on the window for it to work (top-most doesn't work either, top-most doesn't focus it just displaying the window above all other unfocused). Anyone has any idea how can I make it work even if im writing in a notepad? 回答1: Key logging can be used for naughty stuff, and manipulating Caps Lock like that seems rather strange, but since the info

Get Running Processes List and Kill Their Background Services

时光毁灭记忆、已成空白 提交于 2019-11-30 07:01:19
问题 I am building an Android app for RAM optimization. I can successfully get the list of running processes (and their PIDs) using this answer. However, I don't see a way to kill them or their background services by PID. 回答1: It turned out to be something very basic: ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); for (RunningAppProcessInfo pid : am.getRunningAppProcesses()) { am.killBackgroundProcesses(pid.processName); } 来源: https://stackoverflow.com