adding control for non ios and android device in pushnotifications registration
This commit is contained in:
parent
0d1392c499
commit
1d3e74164d
2 changed files with 6 additions and 6 deletions
|
|
@ -103,13 +103,10 @@ if [ ! -d $PROJECT ]; then
|
|||
cordova plugin add cordova-plugin-statusbar
|
||||
checkOK
|
||||
|
||||
cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=bitcoin
|
||||
checkOK
|
||||
|
||||
cordova plugin add phonegap-plugin-push@1.2.3
|
||||
checkOK
|
||||
|
||||
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=bitcoin
|
||||
cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=bitcoin
|
||||
checkOK
|
||||
|
||||
cordova plugin add cordova-plugin-inappbrowser
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
var SOFT_CONFIRMATION_LIMIT = 12;
|
||||
self.isCordova = isCordova;
|
||||
self.isChromeApp = isChromeApp;
|
||||
self.pushDeviceType = isMobile.iOS() || isMobile.Android();
|
||||
self.isSafari = isMobile.Safari();
|
||||
self.onGoingProcess = {};
|
||||
self.historyShowLimit = 10;
|
||||
|
|
@ -12,7 +13,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.prevState = 'walletHome';
|
||||
|
||||
document.addEventListener('deviceready', function() {
|
||||
if (isMobile.Android() || isMobile.iOS()) {
|
||||
if (self.pushDeviceType) {
|
||||
storageService.getDeviceToken(function(err, token) {
|
||||
$timeout(function() {
|
||||
if (!token) pushNotificationsService.pushNotificationsInit();
|
||||
|
|
@ -1285,7 +1286,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
|
||||
$rootScope.$on('Local/SubscribeNotifications', function(event) {
|
||||
pushNotificationsService.enableNotifications();
|
||||
if (self.pushDeviceType) {
|
||||
pushNotificationsService.enableNotifications();
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.$on('Local/UnsubscribeNotifications', function(event, walletId, cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue