diff --git a/cordova/build.sh b/cordova/build.sh index 2ca588571..ab3b2a4c2 100755 --- a/cordova/build.sh +++ b/cordova/build.sh @@ -121,9 +121,6 @@ if [ ! -d $PROJECT ]; then cordova plugin add https://github.com/VersoSolutions/CordovaClipboard checkOK - cordova plugin add cordova-plugin-email-composer@0.8.3 - checkOK - cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare checkOK diff --git a/src/js/controllers/export.js b/src/js/controllers/export.js index 927f7f0c0..79402d6e7 100644 --- a/src/js/controllers/export.js +++ b/src/js/controllers/export.js @@ -140,12 +140,18 @@ angular.module('copayApp.controllers').controller('exportController', if ($scope.noSign) name = name + '(No Private Key)'; - var properties = { - subject: 'Copay Wallet Backup: ' + name, - body: 'Here is the encrypted backup of the wallet ' + name + ': \n\n' + ew + '\n\n To import this backup, copy all text between {...}, including the symbols {}', - isHtml: false - }; - window.plugin.email.open(properties); + var subject = 'Copay Wallet Backup: ' + name; + var body = 'Here is the encrypted backup of the wallet ' + name + ': \n\n' + ew + '\n\n To import this backup, copy all text between {...}, including the symbols {}'; + window.plugins.socialsharing.shareViaEmail( + body, + subject, + null, // TO: must be null or an array + null, // CC: must be null or an array + null, // BCC: must be null or an array + null, // FILES: can be null, a string, or an array + function() {}, + function() {} + ); }); }; diff --git a/src/js/controllers/preferencesInformation.js b/src/js/controllers/preferencesInformation.js index 081a24908..e97c36674 100644 --- a/src/js/controllers/preferencesInformation.js +++ b/src/js/controllers/preferencesInformation.js @@ -80,12 +80,16 @@ angular.module('copayApp.controllers').controller('preferencesInformation', return ('* ' + v.address + ' ' + base + v.path.substring(1) + ' ' + formatDate(v.createdOn)); }).join("\n"); - var properties = { - subject: 'Copay Addresses', - body: body, - isHtml: false - }; - window.plugin.email.open(properties); + window.plugins.socialsharing.shareViaEmail( + body, + 'Copay Addresses', + null, // TO: must be null or an array + null, // CC: must be null or an array + null, // BCC: must be null or an array + null, // FILES: can be null, a string, or an array + function() {}, + function() {} + ); $timeout(function() { $scope.$apply(); diff --git a/src/js/controllers/preferencesLogs.js b/src/js/controllers/preferencesLogs.js index e933a112b..d08681664 100644 --- a/src/js/controllers/preferencesLogs.js +++ b/src/js/controllers/preferencesLogs.js @@ -11,11 +11,15 @@ function(historicLog) { return v.msg; }).join('\n'); - var properties = { - subject: 'Copay Logs', - body: body, - isHtml: false - }; - window.plugin.email.open(properties); + window.plugins.socialsharing.shareViaEmail( + body, + 'Copay Logs', + null, // TO: must be null or an array + null, // CC: must be null or an array + null, // BCC: must be null or an array + null, // FILES: can be null, a string, or an array + function() {}, + function() {} + ); }; });