App running in Background


#1

Is there a way for the app to know as soon as it starts running in the background on a phone?

Thanks


#2

Kind of. The window.onbeforeunload event is for that. I understand that it is not 100% reliable, however, so your mileage may vary.

http://wiki.nsbasic.com/Window

Kind regards,
Doug


#3

There may also be a PhoneGap library which could help you.


#4

Thanks. Unfortunately, i couldn’t get any of the window objects to work. I’ll keep trying!