multitasking

notification when program is in background iOS 4

萝らか妹 提交于 2019-12-10 18:35:53
问题 We are looking for a way to timeout an iPhone application, and have tried several methods: NSTimer that resets after an action LocalNotification that resets after an action Both are close, but suffer from unique issues: NSTimer: When the phone sleeps, the timer will not fire LocalNotification: When the app is in the background, the notification is displayed, we don't have a way to have the application have to receive the notification. Asking the group if this sounds correct, or if there is

what is scheduler latency?

柔情痞子 提交于 2019-12-10 18:33:32
问题 This seems to be a basic question, but i couldn't find answer anywhere in googling it. As Far As I Understand, scheduler latency is the time incurred in making the task runnable again. I mean, if there are 100 processes namely 1, 2, e.t.c, then they are executed let's say in order starting from 1. So the latency is the time that the process 1 is executed again. which means that the latency is the waiting time of the process as well as the waiting time of it when it is in runqueue ready to

What UIViewController method is called when opening app from background?

喜你入骨 提交于 2019-12-10 18:29:22
问题 Is there any conventient way of determining if a view is being loaded from the app being in background mode? In 3.X I would rely on viewDidLoad to do some initalization etc., this however is not the case for 4.X, as you cannot rely for the viewDidLoad method to be called. I would like to avoid putting in extra flags to detect this in the appdelegate, I would rather use a reliable way of doing this in the UIViewController, but cannot seem to find anything in the lifecycle of a UIViewController

iOS - backgroundTimeRemaining value not showing what expected

倾然丶 夕夏残阳落幕 提交于 2019-12-10 13:28:04
问题 I'm trying to check the value of backgroundTimeRemaining , but I get a very large number. The value of the property is supposed to be the corresponding to 10 min aprox, and I`ve read in Apple documentation here that such value is large when the app is in the foreground. However, I get a large value even when in background: - (void)applicationDidEnterBackground:(UIApplication *)application { bgTask = [application beginBackgroundTaskWithExpirationHandler:^{ [application endBackgroundTask:bgTask

iPhone UIApplicationExitsOnSuspend ineffective

落爺英雄遲暮 提交于 2019-12-10 09:55:02
问题 UIApplicationExitsOnSuspend does not force my app to exit. I have cleaned the target, removed the app, rebuilt, and reinstalled many times. I really need my app to exit. 回答1: Did you link against SDK 4? This key is only effective in this case. 回答2: Are you sure your application is still active ? You will always see your application when double tapping the home button : this is a list of the recently used apps, not a list of currently running apps Put a breakpoint in the

POSIX C Threads. Mutex example. Don't work as expected

一世执手 提交于 2019-12-10 03:01:50
问题 I have a big problem, I can't figure out why mutexes in C don't work as I expect. This is my code: #include <stdlib.h> #include <stdio.h> #include <pthread.h> pthread_t mythread; pthread_mutex_t mymutex; void *anotherFunc(void*) { pthread_mutex_lock(&mymutex); for(int i = 0; i < 100; i++) printf("anotherFunc\n"); pthread_mutex_unlock(&mymutex); pthread_exit(NULL); } void *func(void*) { pthread_mutex_lock(&mymutex); for(int i = 0; i < 100; i++) printf("func\n"); pthread_mutex_unlock(&mymutex);

how to do multitasking application in ios 4.0

让人想犯罪 __ 提交于 2019-12-10 00:21:37
问题 i am having application running on os3.0 i need to adopt this for ios4.0 wat are the major things i hav to take care... how can i do existing application compatable to multitasking? 回答1: It's all in Apple's developer documentation. http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html 来源: https://stackoverflow.com/questions/3181314/how-to-do-multitasking-application-in-ios-4-0

how to stop MPMoviePlayerViewController from downloading video if the app is in background

为君一笑 提交于 2019-12-08 12:32:34
问题 I use MPMoviePlayerViewController to play some videos form the internet. When the user presses home button and the app goes in background, the iphone still downloads a lot of information. Can anyone recomend me how the trafic can be stopped, without disabling multitasking or calling exit(0)? I have tried to stop the MPMoviePlayerViewController, but in some cases, when the MPMoviePlayerViewController is not fully loaded, the it doesn't respond(not the video, the MPMoviePlayerViewController).

Kill intent on splash screen

久未见 提交于 2019-12-08 12:18:36
问题 this is my Splash Screen, If I press home or multitasking/appswitch button when Intent is started app crash, in logcat is FATAL EXEPTION: Thread-1277. Can I kill/delete this Intent when player press home button? public class SplashScreen extends Activity { private static int loadingTime = 1000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG

Application doesn't run in background, but can I still do some task before my application gets terminated?

柔情痞子 提交于 2019-12-08 06:07:29
问题 I have a weird situation, client does't want their application to support multitasking so I created a flag in info.plist like, Application does not run in background = YES; However there are times during application lifecycle that the application must upload some data to server before it terminates. If it doesn't then server will have fuzzy data and my client's company (and probably me too...) will be doomed!!! Now my questions are, How much time do I have before OS will terminate my app?