use new cordova plugin syntax