Skip to main content
Inspiring
January 3, 2018
Question

Event when app regains focus

  • January 3, 2018
  • 1 reply
  • 353 views

I am writing an AIR app for mobile devices, and I am using a webview ANE in the mobile app.  The problem that I am having is that when I minimize my app and use a couple of other apps on an iPad, and then return to my app, sometimes the webview no longer contains content.  I would like to possibly refresh the webview when the app regains focus, but I have no idea if an event is fired when this happens.  Are any events fired on a mobile device when an app regains focus??

Thanks for any help!!

This topic has been closed for replies.

1 reply

Inspiring
January 3, 2018
Inspiring
January 3, 2018

Thanks ASWC.  Have you ever used these events???  I only ask because I googled how to save state in AIR, and they use events attached to the NativeApplication, and they claim that the events don't get fired 100% of the time so it is unreliable, but that article was written back in 2011.  I wonder if it has been improved over the years??  Have you ever used Event.ACIVATE or Event.DEACTIVATE???