cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: FW: cordova API doc queries (pause event)
Date Wed, 22 May 2013 17:41:54 GMT
Can only speak for iOS.

Pause which corresponds to system event
UIApplicationDidEnterBackgroundNotification:
https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVViewController.m#L896-L900

Resume which corresponds to system event
UIApplicationWillEnterForegroundNotification:
https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVViewController.m#L879-L883

Here's more info on the app states on iOS (see Moving to the Background
section):
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

My blog post (note we don't support iOS 4 anymore, but there are some
interesting tidbits):
http://shazronatadobe.wordpress.com/2012/03/14/apache-cordova-lifecycle-events-in-ios-4-versus-ios-5/




On Wed, May 22, 2013 at 9:54 AM, Michael Sierra <msierra@adobe.com> wrote:

> (Retitled the thread to narrow this issue.)
>
> Would an app typically be paused by the device platform as it anticipates
> it's about to die for lack of battery?
>
> Also, please confirm pause/resume necessarily applies only when execution
> of an application is actually suspended, not when it's somehow running in
> the background in some minified way as was the case on meego.  Do any of
> these platforms support that kind of multitasking?  If so, it would affect
> how you might use the notification API.
>
> Sorry for all the naive questions, and thanks,
>
> --Mike S
>
> ________________________________________
> From: Shazron [shazron@gmail.com]
> Sent: Monday, May 20, 2013 5:05 PM
> To: dev@cordova.apache.org
> Cc: Michael Sierra
> Subject: Re: FW: cordova API doc queries
>
> ...
> * The doc for the "pause" and "retrieve" events say "native code"
>   takes the app in and out of the background.  Yes, but does that mean
>   it can be controlled by anything other than direct user manipulation?
>   E.g., an app can't pause itself, correct?
>
>
> No, the app can't pause itself. The system throws events that we capture,
> and translate to pause/resume.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message