add support for cordova's `deviceready` event