on 04-25-2015 2:37 PM
Hi ,
I am new to HCPms and I am trying to develop the push notification with kapsel using WebIDE, I am not getting any response back from the following method.
var nTypes = sap.Push.notificationType.SOUNDS | sap.Push.notificationType.ALERT;
sap.Push.registerForNotificationTypes(
nTypes,
function(result) {
alert("result");
alert("Successfully registered: " + JSON.stringify(result));
},
function(errorInfo) {
alert("errorInfo");
alert("Error while registering. " + JSON.stringify(errorInfo));
},
function(notification) {
alert("in processNotification: " + JSON.stringify(notification));
},
"sender id");
No alert is been thrown, none of the three mentioned callback is been called , not sure whether the application is registered for push and when i try to check from rest client by post request to push url, I am getting 403 forbitten error, Kindly help.
Thank you
Rottwei
Hi Midhun & Jitendra,
Thanks a lot, The issue is resolved. It was becoz of Gcm.jar library not loaded properly and the Server API key Authorization issue.
Rottwei (Kishore Kumar)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rottwei,
Before sending push notification you can check if device has registered at GCM.
Make a call in REST client
Request:
http://smpserverhostname:8080/odata/applications/latest/appid/Connections('appcid')
GET method
Header: content-type : application/json
Response:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rottwei,
If the registration is successful it should go to the successCallback function otherwise it goes to errorCallback. You could debug code using Chrome - http://java.dzone.com/articles/debugging-android
The sender ID should be your project number from google developer console. If the push registration is successful you could test it from REST client.
Regards,Midhun
SAP Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.