fix share buttons
This commit is contained in:
parent
e7bb449b6e
commit
826d9fe072
2 changed files with 21 additions and 9 deletions
|
|
@ -65,6 +65,7 @@
|
||||||
<variable name="SENDER_ID" value="*PUSHSENDERID*"/>
|
<variable name="SENDER_ID" value="*PUSHSENDERID*"/>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin name="cordova-custom-config" spec="~3.0.5" />
|
<plugin name="cordova-custom-config" spec="~3.0.5" />
|
||||||
|
<plugin name="cordova-plugin-queries-schemes" spec="~0.1.5" />
|
||||||
|
|
||||||
<!-- Supported Platforms -->
|
<!-- Supported Platforms -->
|
||||||
<engine name="ios" spec="~4.2.1" />
|
<engine name="ios" spec="~4.2.1" />
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('completeController', function
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
||||||
$scope.shareFacebook = function() {
|
$scope.shareFacebook = function() {
|
||||||
window.plugins.socialsharing.shareViaFacebook(config.download.url, null, null, null);
|
window.plugins.socialsharing.shareVia($scope.shareFacebookVia, config.download.url, null, null, null, null, null);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.shareTwitter = function() {
|
$scope.shareTwitter = function() {
|
||||||
|
|
@ -31,7 +31,7 @@ angular.module('copayApp.controllers').controller('completeController', function
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
if(window.StatusBar){
|
if (window.StatusBar) {
|
||||||
$log.debug('Hiding status bar...');
|
$log.debug('Hiding status bar...');
|
||||||
StatusBar.hide();
|
StatusBar.hide();
|
||||||
}
|
}
|
||||||
|
|
@ -49,17 +49,28 @@ angular.module('copayApp.controllers').controller('completeController', function
|
||||||
$scope.socialsharing = isAvailable;
|
$scope.socialsharing = isAvailable;
|
||||||
if (isAvailable) {
|
if (isAvailable) {
|
||||||
window.plugins.socialsharing.canShareVia('com.apple.social.facebook', 'msg', null, null, null, function(e) {
|
window.plugins.socialsharing.canShareVia('com.apple.social.facebook', 'msg', null, null, null, function(e) {
|
||||||
|
$scope.shareFacebookVia = 'com.apple.social.facebook';
|
||||||
$scope.facebook = true;
|
$scope.facebook = true;
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
$log.debug('facebook error: ' + e);
|
window.plugins.socialsharing.canShareVia('com.facebook.katana', 'msg', null, null, null, function(e) {
|
||||||
$scope.facebook = false;
|
$scope.shareFacebookVia = 'com.facebook.katana';
|
||||||
|
$scope.facebook = true;
|
||||||
|
}, function(e) {
|
||||||
|
$log.debug('facebook error: ' + e);
|
||||||
|
$scope.facebook = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
window.plugins.socialsharing.canShareVia('com.twitter.android', 'msg', null, null, null, function(e) {
|
window.plugins.socialsharing.canShareVia('com.apple.social.twitter', 'msg', null, null, null, function(e) {
|
||||||
$scope.shareTwitterVia = 'com.twitter.android';
|
$scope.shareTwitterVia = 'com.apple.social.twitter';
|
||||||
$scope.twitter = true;
|
$scope.twitter = true;
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
$log.debug('twitter error: ' + e);
|
window.plugins.socialsharing.canShareVia('com.twitter.android', 'msg', null, null, null, function(e) {
|
||||||
$scope.twitter = false;
|
$scope.shareTwitterVia = 'com.twitter.android';
|
||||||
|
$scope.twitter = true;
|
||||||
|
}, function(e) {
|
||||||
|
$log.debug('twitter error: ' + e);
|
||||||
|
$scope.twitter = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
window.plugins.socialsharing.canShareVia('com.google.android.apps.plus', 'msg', null, null, null, function(e) {
|
window.plugins.socialsharing.canShareVia('com.google.android.apps.plus', 'msg', null, null, null, function(e) {
|
||||||
$scope.shareGooglePlusVia = 'com.google.android.apps.plus';
|
$scope.shareGooglePlusVia = 'com.google.android.apps.plus';
|
||||||
|
|
@ -85,7 +96,7 @@ angular.module('copayApp.controllers').controller('completeController', function
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.afterLeave", function() {
|
$scope.$on("$ionicView.afterLeave", function() {
|
||||||
if(window.StatusBar){
|
if (window.StatusBar) {
|
||||||
$log.debug('Showing status bar...');
|
$log.debug('Showing status bar...');
|
||||||
StatusBar.show();
|
StatusBar.show();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue