Replace deprecated Cordova methods