background-process

iOS - Can an app running in the background send touch / gesture events to another app in the foreground?

给你一囗甜甜゛ 提交于 2019-11-29 08:50:08
I have been asked to develop an app that will record and later "play back" touches and gestures onto another app running in the foreground. From my experience and knowledge, this is not possible unless both apps are setup to send/receive data between them through notifications or other methods. Also, it would be a huge risk for apps and their data to be exposed to anybody. I am 99% sure this is not possible, but was just curious if anyone else has come across something similar (or documentation that specifically states this is forbidden). Nope not possible, no way no how, dont even try.

AudioQueueStart fail -12985

喜你入骨 提交于 2019-11-29 06:42:54
I made a streaming music player and it works fine in the foreground. But in the background iOS4, it doesn't play the next song automatically. ( remote control works ) The reason is AudioQueueStart return -12985 . I already check the audio session. it just fine. I use AudioQueueStart when it start to play the music. How can you remove AudioQueueStart ? - (void)play { [self setupAudioQueueBuffers]; // calcluate the size to use for each audio queue buffer, and calculate the // number of packets to read into each buffer OSStatus status = AudioQueueStart(self.queueObject, NULL); } I read the answer

How can I start a process in the background?

99封情书 提交于 2019-11-29 04:08:06
I can't seem to find an answer on Google or here on StackOverflow. How can I start a process in background (behind the active window)? Like, when the process starts, it will not interrupt the current application the user is using. The process won't pop out in front of the current application, it will just start. This is what I'm using: Process.Start(Chrome.exe); Chrome pops up in front of my application when it's started. How can I make it start in background? I've also tried: psi = new ProcessStartInfo ("Chrome.exe"); psi.UseShellExecute = true; psi.WindowStyle = ProcessWindowStyle.Hidden;

iOS Background Fetch Not Working Even Though Correct Background Mode Configured

余生颓废 提交于 2019-11-29 02:51:42
My app has background modes enabled with Background Fetch checked and I validated the plist includes the appropriate fetch mode. I have also configured the interval as follows: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { application.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum); return true; } And I have added the handler as follows: func application(application: UIApplication, performFetchWithCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) { // Get some new

Background Key Press Listener

萝らか妹 提交于 2019-11-29 02:38:26
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? Key logging can be used for naughty stuff, and manipulating Caps Lock like that seems rather strange, but since the info is already publicly available, and you know your user stories better than me, I've posted a solution. Here's

Start or ensure that Delayed Job runs when an application/server restarts

拟墨画扇 提交于 2019-11-29 00:52:09
问题 We have to use delayed_job (or some other background-job processor) to run jobs in the background, but we're not allowed to change the boot scripts/boot-levels on the server. This means that the daemon is not guaranteed to remain available if the provider restarts the server (since the daemon would have been started by a capistrano recipe that is only run once per deployment). Currently, the best way I can think of to ensure the delayed_job daemon is always running, is to add an initializer

Get Running Processes List and Kill Their Background Services

删除回忆录丶 提交于 2019-11-29 00:17:11
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. 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/questions/12892400/get-running-processes-list-and-kill-their-background-services

Continue operation when app did enter background on iOS

安稳与你 提交于 2019-11-29 00:10:41
in my app i have some NSOperation that update some core data element from a online database, sometime the update require some minute, and when the screen of iPhone lock, the app enter in the background mode, and this update is stopped, so i have to reopen the app to continue the update, so i have search a lot on stack overflow and i have find some information about: beginBackgroundTaskWithExpirationHandler that is a method from apple that let continue some task also when the app is in the background mode, and i have do this: - (void)applicationDidEnterBackground:(UIApplication *)application {

Running iOS App in background for more than 10 minutes

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 20:40:08
问题 I am trying to allow my app to run in the background for more that 10 minutes, according to this and my good below. (I want to use long background running to keep track of a location, my code here simply just use a counter for testing purposes) Anyone can help point out what the problem is? Implementing Long-Running Background Tasks For tasks that require more execution time to implement, you must request specific permissions to run them in the background without their being suspended. In iOS

Bash & (ampersand) operator

折月煮酒 提交于 2019-11-28 19:37:07
I'm trying to run 3 commands in parallel in bash shell: $ (first command) & (second command) & (third command) & wait The problem with this is that if first command fails, for example, the exit code is 0 (I guess because wait succeeds). The desired behavior is that if one of the commands fails, the exit code will be non-zero (and ideally, the other running commands will be stopped). How could I achieve this? Please note that I want to run the commands in parallel! the best I can think of is: first & p1=$! second & p2=$! ... wait $p1 && wait $p2 && .. or wait $p1 || ( kill $p2 $p3 && exit 1 ) .