Added event handling for online/offlien transitions driven by the Cordova container.