One of our web applications needs to use push messaging.
The application registers ok for the push service, and appears to register the notification message handler.
the code is:
window.onload = function ()
{
console.log("registering push on device");
var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
tizen.push.registerService(service, push_registerSuccessCallback, push_errorCallback);
};
function push_errorCallback(response)
{
console.log('PUSH: The following error occurred: ' + response.name);
}
function push_registerSuccessCallback(id)
{
tizen.push.connectService(push_notificationCallback, push_errorCallback);
console.log('Connected to Tizen Service with id: ' + id);
}
function push_notificationCallback(noti)
{
console.log("Notification received with message: " + noti.alertMessage);
}
console output:
js/main.js (3) :registering push on device
js/main.js (17) :Connected to Tizen Service with id: 04a1c0cc784a1075b8b35411387b5f23d694a0ed6f6c32d5fe8257c08656819cd6c6e88a205e2b6696de6217ee48435e9c71
Sending a message through the server push api gives this result:
{"results":[{"regID":"04a1c0cc784a1075b8b35411387b5f23d694a0ed6f6c32d5fe8257c08656819cd6c6e88a205e2b6696de6217ee48435e9c71","requestID":"1374584916366","statusCode":1000,"statusMsg":"Success"}]}
Everything appears ok to me, but nothing happens in the client, push_notificationCallback is not being called.
Anyone have any ideas what might be the problem?