I've just installed the Xtify Cordova plugin for android. After following the implementation guide, I am having trouble registering a new user. It is stuck on an "inProgress" error.
Here is the deviceready event function:
var onDeviceReady=function()
{
// Xtify stuff
// Start Xtify
window.plugins.XtifySDK.start(notificationCallBack,
function (error)
{
console.log("Error occurred while starting Xtify SDK.");
});
// get the xid
window.plugins.XtifySDK.getXid(function(xid)
{
console.log('XID is: ' + xid );
},
function(error)
{
console.log("Error: " + error);
});
// test for registration success
window.plugins.XtifySDK.isRegistered(function()
{
console.log("device is registered");
},
function (errorId)
{
if (errorId == "inProgress")
{
console.log("Registration in progress.");
}
else
{
console.log("Error: " + errorId);
}
});
};
The error returned is only ever "inProgress". Additionally, I tried to put a timeout of 1, 2, and 5 seconds on the isRegistered() function to no avail. Attempting to get the xid before it is properly registered logs the following: "Error: The XID is not available until the device is registered". One last thing. I did trace the error back as far as I could, which was into Xtify itself. Everything seemed to be kosher with the plugin.
Anyone have an idea as to where I erred? I double and triple checked the implementation guide, but somewhere in those instructions must be the problem. Thanks in advance!
Bob