Merge pull request #936 from yemel/feature/android-cordova

Android - Migration to Cordova + Crosswalk Framework
This commit is contained in:
Matias Alejo Garcia 2014-07-25 16:40:13 -03:00
commit 560702df58
51 changed files with 4706 additions and 12 deletions

View file

@ -30,13 +30,14 @@ BackupService.prototype.download = function(wallet) {
}
// throw an email intent if we are in the mobile version
if (window.xwalk) {
if (window.cordova) {
var name = wallet.name ? wallet.name + ' ' : '';
var partial = partial ? 'Partial ' : '';
var subject = 'Copay - ' + name + 'Wallet ' + partial + 'Backup';
var body = 'This is the encrypted backup of the wallet ' + wallet.id + ':\n\n' + ew;
var mailURL = encodeURI('mailto:?subject=' + subject + '&body=' + body);
return window.open(mailURL,'_blank');
return window.plugin.email.open({
subject: 'Copay - ' + name + 'Wallet ' + partial + 'Backup',
body: 'Here is the encrypted backup of the wallet ' + wallet.id,
attachments: ['base64:' + filename + '//' + btoa(ew)]
});
}
// otherwise lean on the browser implementation