This is the code i am using to register, i cannot edit, so sorry for the 3 posts
01.
document.addEventListener(
"deviceready"
, onDeviceReady,
false
);
02.
03.
function
onDeviceReady() {
04.
console.log(
"device is ready"
);
05.
// Now safe to use device APIs
06.
07.
var
el =
new
Everlive(
'e**********5'
);
08.
var
pushSettings = {
09.
iOS: {
10.
badge:
true
,
11.
sound:
true
,
12.
alert:
true
,
13.
clearBadge:
true
14.
},
15.
android: {
16.
projectNumber:
'*22*****975'
17.
},
18.
19.
notificationCallbackIOS:
function
(e) {
20.
// logic for handling push in iOS
21.
},
22.
notificationCallbackAndroid:
function
(e) {
23.
// logic for handling push in Android
24.
}
25.
};
26.
27.
el.push.register(
28.
pushSettings,
29.
function
successCallback(data) {
30.
// This function will be called once the device is successfully registered
31.
console.log(data);
32.
},
33.
function
errorCallback(error) {
34.
// This callback will be called any errors occurred during the device
35.
// registration process
36.
console.log(error);
37.
}
38.
);
39.
};