Updated cordova deprecated callback approach