diff --git a/cordova/build.sh b/cordova/build.sh index 321545ae3..95fa23754 100755 --- a/cordova/build.sh +++ b/cordova/build.sh @@ -109,6 +109,9 @@ if [ ! -d $PROJECT ]; then cordova plugin add https://github.com/katzer/cordova-plugin-email-composer.git checkOK + cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare + checkOK + fi if $DBGJS diff --git a/js/controllers/receive.js b/js/controllers/receive.js index ddb125490..a8bd07a20 100644 --- a/js/controllers/receive.js +++ b/js/controllers/receive.js @@ -17,9 +17,16 @@ angular.module('copayApp.controllers').controller('ReceiveController', } }; + $scope.shareAddress = function(addr) { + if (isCordova) { + window.plugins.socialsharing.share('My bitcoin address: ' + addr); + } + }; + $scope.init = function() { $rootScope.title = 'Receive'; $scope.showAll = false; + $scope.isCordova = isCordova; var w = $rootScope.wallet; var lastAddr = _.first(w.getAddressesOrdered()); diff --git a/views/receive.html b/views/receive.html index abf765ce3..a45b83a66 100644 --- a/views/receive.html +++ b/views/receive.html @@ -16,6 +16,12 @@