phonegap hooks