Commit 9c690f4e by Alen Jose

notification error

parent 9e3eb915
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.techware.cmcdriver" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>CMC-Driver</name> <name>CMC-Driver</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
...@@ -76,13 +76,16 @@ ...@@ -76,13 +76,16 @@
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /> <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform> </platform>
<engine name="android" spec="^6.2.3" /> <engine name="android" spec="^6.3.0" />
<plugin name="cordova-android-support-gradle-release" spec="^1.4.4">
<variable name="ANDROID_SUPPORT_VERSION" value="27.1.0" />
</plugin>
<plugin name="cordova-plugin-app-event" spec="^1.2.1" /> <plugin name="cordova-plugin-app-event" spec="^1.2.1" />
<plugin name="cordova-plugin-device" spec="^2.0.2" /> <plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" /> <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.19" /> <plugin name="cordova-plugin-ionic-webview" spec="^1.1.19" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" /> <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" /> <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="de.appplant.cordova.plugin.local-notification" spec="^0.8.5" />
<plugin name="cordova-plugin-x-toast" spec="^2.6.2" /> <plugin name="cordova-plugin-x-toast" spec="^2.6.2" />
</widget> </widget>
...@@ -471,6 +471,14 @@ ...@@ -471,6 +471,14 @@
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
}, },
"android-versions": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.3.0.tgz",
"integrity": "sha512-d/i1G16Oaw/T1EvskUA7Oo1vIQVK/0ZlpQgZfYVBwg6v/9FBE3QV66g5N1/bTHpRml8tFLxh+KoTw5DokK9c+A==",
"requires": {
"semver": "5.5.0"
}
},
"angularfire2": { "angularfire2": {
"version": "5.0.0-rc.11", "version": "5.0.0-rc.11",
"resolved": "https://registry.npmjs.org/angularfire2/-/angularfire2-5.0.0-rc.11.tgz", "resolved": "https://registry.npmjs.org/angularfire2/-/angularfire2-5.0.0-rc.11.tgz",
...@@ -1362,11 +1370,12 @@ ...@@ -1362,11 +1370,12 @@
"dev": true "dev": true
}, },
"cordova-android": { "cordova-android": {
"version": "6.2.3", "version": "6.3.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.2.3.tgz", "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.3.0.tgz",
"integrity": "sha1-JJ8hts5fHxyEenq4OxaQnb7Vqig=", "integrity": "sha1-2lQYQz0lx1pZd7QoJEu+Q30BKNI=",
"requires": { "requires": {
"cordova-common": "2.0.2", "android-versions": "1.3.0",
"cordova-common": "2.1.0",
"elementtree": "0.1.6", "elementtree": "0.1.6",
"nopt": "3.0.6", "nopt": "3.0.6",
"properties-parser": "0.2.3", "properties-parser": "0.2.3",
...@@ -1383,7 +1392,7 @@ ...@@ -1383,7 +1392,7 @@
"bundled": true "bundled": true
}, },
"balanced-match": { "balanced-match": {
"version": "0.4.2", "version": "1.0.0",
"bundled": true "bundled": true
}, },
"base64-js": { "base64-js": {
...@@ -1391,21 +1400,21 @@ ...@@ -1391,21 +1400,21 @@
"bundled": true "bundled": true
}, },
"big-integer": { "big-integer": {
"version": "1.6.22", "version": "1.6.25",
"bundled": true "bundled": true
}, },
"bplist-parser": { "bplist-parser": {
"version": "0.1.1", "version": "0.1.1",
"bundled": true, "bundled": true,
"requires": { "requires": {
"big-integer": "1.6.22" "big-integer": "1.6.25"
} }
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.7", "version": "1.1.8",
"bundled": true, "bundled": true,
"requires": { "requires": {
"balanced-match": "0.4.2", "balanced-match": "1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
} }
}, },
...@@ -1414,7 +1423,7 @@ ...@@ -1414,7 +1423,7 @@
"bundled": true "bundled": true
}, },
"cordova-common": { "cordova-common": {
"version": "2.0.2", "version": "2.1.0",
"bundled": true, "bundled": true,
"requires": { "requires": {
"ansi": "0.3.1", "ansi": "0.3.1",
...@@ -1422,11 +1431,11 @@ ...@@ -1422,11 +1431,11 @@
"cordova-registry-mapper": "1.1.15", "cordova-registry-mapper": "1.1.15",
"elementtree": "0.1.6", "elementtree": "0.1.6",
"glob": "5.0.15", "glob": "5.0.15",
"minimatch": "3.0.3", "minimatch": "3.0.4",
"osenv": "0.1.4", "osenv": "0.1.4",
"plist": "1.2.0", "plist": "1.2.0",
"q": "1.5.0", "q": "1.5.0",
"semver": "5.3.0", "semver": "5.4.1",
"shelljs": "0.5.3", "shelljs": "0.5.3",
"underscore": "1.8.3", "underscore": "1.8.3",
"unorm": "1.4.1" "unorm": "1.4.1"
...@@ -1449,7 +1458,7 @@ ...@@ -1449,7 +1458,7 @@
"requires": { "requires": {
"inflight": "1.0.6", "inflight": "1.0.6",
"inherits": "2.0.3", "inherits": "2.0.3",
"minimatch": "3.0.3", "minimatch": "3.0.4",
"once": "1.4.0", "once": "1.4.0",
"path-is-absolute": "1.0.1" "path-is-absolute": "1.0.1"
} }
...@@ -1471,10 +1480,10 @@ ...@@ -1471,10 +1480,10 @@
"bundled": true "bundled": true
}, },
"minimatch": { "minimatch": {
"version": "3.0.3", "version": "3.0.4",
"bundled": true, "bundled": true,
"requires": { "requires": {
"brace-expansion": "1.1.7" "brace-expansion": "1.1.8"
} }
}, },
"nopt": { "nopt": {
...@@ -1534,7 +1543,7 @@ ...@@ -1534,7 +1543,7 @@
"bundled": true "bundled": true
}, },
"semver": { "semver": {
"version": "5.3.0", "version": "5.4.1",
"bundled": true "bundled": true
}, },
"shelljs": { "shelljs": {
...@@ -1570,11 +1579,24 @@ ...@@ -1570,11 +1579,24 @@
} }
} }
}, },
"cordova-android-support-gradle-release": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/cordova-android-support-gradle-release/-/cordova-android-support-gradle-release-1.4.4.tgz",
"integrity": "sha512-DOwZ+MX0CBoagXV6cHqfQacVjsrDea8z2wuM427AIvi2eAFvojw85o1XMCdJ4kSDMbsUUaNPw12h7uY0m+rcvg==",
"requires": {
"xml2js": "0.4.19"
}
},
"cordova-plugin-app-event": { "cordova-plugin-app-event": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-app-event/-/cordova-plugin-app-event-1.2.1.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-app-event/-/cordova-plugin-app-event-1.2.1.tgz",
"integrity": "sha1-DuuxQTKqQ7suXAgamr29l8otgTI=" "integrity": "sha1-DuuxQTKqQ7suXAgamr29l8otgTI="
}, },
"cordova-plugin-badge": {
"version": "0.8.7",
"resolved": "https://registry.npmjs.org/cordova-plugin-badge/-/cordova-plugin-badge-0.8.7.tgz",
"integrity": "sha512-s+s4yusKdeJ4sMPhQs4zR3lR2UuROzSy14GFAp00pTHPiBfCtxeINSUYAZYnpuO3RGx6PPlVCwSJpVG0IdM58g=="
},
"cordova-plugin-device": { "cordova-plugin-device": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-2.0.2.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-2.0.2.tgz",
...@@ -1590,6 +1612,11 @@ ...@@ -1590,6 +1612,11 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-1.1.19.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-1.1.19.tgz",
"integrity": "sha512-Sgs6eHWsVFYBuc2xVhA3JqV7d7Wac6Yj1ZJjBLrhaA60LlMV8pReaPvWr898DKoLfhlBhJqNBEJSUAVP/4G9FA==" "integrity": "sha512-Sgs6eHWsVFYBuc2xVhA3JqV7d7Wac6Yj1ZJjBLrhaA60LlMV8pReaPvWr898DKoLfhlBhJqNBEJSUAVP/4G9FA=="
}, },
"cordova-plugin-local-notification": {
"version": "0.9.0-beta.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-local-notification/-/cordova-plugin-local-notification-0.9.0-beta.2.tgz",
"integrity": "sha512-63n77K1pt8dnbWnNR8QWETi9Glezi1bvNHvHWmGNIOv0xCb0phZnm+Ku49BQ+omwe8Z5voMvrA4I03SYPpv38w=="
},
"cordova-plugin-splashscreen": { "cordova-plugin-splashscreen": {
"version": "5.0.2", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz",
...@@ -1732,15 +1759,6 @@ ...@@ -1732,15 +1759,6 @@
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
"dev": true "dev": true
}, },
"de.appplant.cordova.plugin.local-notification": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/de.appplant.cordova.plugin.local-notification/-/de.appplant.cordova.plugin.local-notification-0.8.5.tgz",
"integrity": "sha1-4MaobqUqxPQdumdSHZGlippCo70=",
"requires": {
"cordova-plugin-app-event": "1.2.1",
"cordova-plugin-device": "2.0.2"
}
},
"debug": { "debug": {
"version": "2.6.9", "version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
...@@ -5207,8 +5225,7 @@ ...@@ -5207,8 +5225,7 @@
"sax": { "sax": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
"dev": true
}, },
"scss-tokenizer": { "scss-tokenizer": {
"version": "0.2.3", "version": "0.2.3",
...@@ -5234,8 +5251,7 @@ ...@@ -5234,8 +5251,7 @@
"semver": { "semver": {
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
"dev": true
}, },
"send": { "send": {
"version": "0.16.2", "version": "0.16.2",
...@@ -6976,7 +6992,6 @@ ...@@ -6976,7 +6992,6 @@
"version": "0.4.19", "version": "0.4.19",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
"dev": true,
"requires": { "requires": {
"sax": "1.2.4", "sax": "1.2.4",
"xmlbuilder": "9.0.7" "xmlbuilder": "9.0.7"
...@@ -6985,8 +7000,7 @@ ...@@ -6985,8 +7000,7 @@
"xmlbuilder": { "xmlbuilder": {
"version": "9.0.7", "version": "9.0.7",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
"dev": true
}, },
"xmlhttprequest": { "xmlhttprequest": {
"version": "1.8.0", "version": "1.8.0",
......
...@@ -33,15 +33,17 @@ ...@@ -33,15 +33,17 @@
"@ionic-native/toast": "^4.9.0", "@ionic-native/toast": "^4.9.0",
"@ionic/storage": "2.1.3", "@ionic/storage": "2.1.3",
"angularfire2": "^5.0.0-rc.11", "angularfire2": "^5.0.0-rc.11",
"cordova-android": "^6.2.3", "cordova-android": "^6.3.0",
"cordova-android-support-gradle-release": "^1.4.4",
"cordova-plugin-app-event": "^1.2.1", "cordova-plugin-app-event": "^1.2.1",
"cordova-plugin-badge": "^0.8.7",
"cordova-plugin-device": "^2.0.2", "cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.0.5", "cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.1.19", "cordova-plugin-ionic-webview": "^1.1.19",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3", "cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-toast": "^2.6.2", "cordova-plugin-x-toast": "^2.6.2",
"de.appplant.cordova.plugin.local-notification": "^0.8.5",
"firebase": "^5.2.0", "firebase": "^5.2.0",
"ionic-angular": "3.9.2", "ionic-angular": "3.9.2",
"ionicons": "3.0.0", "ionicons": "3.0.0",
...@@ -63,8 +65,11 @@ ...@@ -63,8 +65,11 @@
"cordova-plugin-splashscreen": {}, "cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {}, "cordova-plugin-whitelist": {},
"cordova-plugin-app-event": {}, "cordova-plugin-app-event": {},
"de.appplant.cordova.plugin.local-notification": {}, "cordova-plugin-x-toast": {},
"cordova-plugin-x-toast": {} "cordova-plugin-local-notification": {},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.1.0"
}
}, },
"platforms": [ "platforms": [
"android" "android"
......
...@@ -117,6 +117,7 @@ export class MyApp { ...@@ -117,6 +117,7 @@ export class MyApp {
} }
}) })
},20000) },20000)
This.setlocalNotification();
} }
openPage(page) { openPage(page) {
...@@ -158,13 +159,34 @@ export class MyApp { ...@@ -158,13 +159,34 @@ export class MyApp {
} }
setlocalNotification(){ setlocalNotification(){
this.localNotifications.schedule({ this.myservice.load_post({ id: this.local.id }, 'getMyRides').subscribe(response => {
text: 'Delayed ILocalNotification',
if (response.status == 'success') {
// console.log(response.data.upcoming)
var upcoming = response.data.upcoming
for (let i = 0; i < upcoming.length; i++) {
this.localNotifications.schedule([{
id: i,
text: 'Ride Notification',
title: 'CMC-Driver', title: 'CMC-Driver',
trigger: { at: new Date(new Date().getTime() + 120000) }, trigger: { at: new Date(upcoming[i].pickup_date + upcoming[i].pickup_time) },
led: 'FF0000', led: 'FF0000',
sound: null sound: null
}); }
]);
// if(i == upcoming.length-1){
var This = this
setTimeout(() => {
This.localNotifications.getAll().then(data=>{
console.log('1',data)
})
}, 5000);
// }
}
}
})
} }
} }
...@@ -44,7 +44,7 @@ export class SigninPage { ...@@ -44,7 +44,7 @@ export class SigninPage {
} }
else{ else{
This.myservice.hide_loader(); This.myservice.hide_loader();
this.myservice.show_alert('', response.message) This.myservice.show_alert('', response.message)
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment