As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Check that the _push value of the user contains a token for either _devicetokens or for GCM (for iOS and Android, respectively). If the token is not there, it may occur in a broadcast but not a sendPush.
For custom payloads, you can use the sendPayload method found at http://devcenter.kinvey.com/reference/business-logic/reference.html#Payloads
N
Neto Leal
said
over 9 years ago
Hi Michael, thank you for your help. But, it still not working for me.
I've tested if user has the device token as you said and is there.
if( user._push )
{
logger.info( user._push );
push.send( user, aps.alert );
}
The console log says:
{
"_devicetokens": [
""
]
}
any other suggestions?
N
Neto Leal
said
over 9 years ago
Sorry, in my previous message, the forum supressed the device token. Trying again:
Suddenly it started to work. So I went out to lunch and when I got back, it stopped again without any modification. Seems that the push service is unstable. Is it normal?
Neto Leal
I have the following code:
//=====================
var findUser = function( id, callback )
{
userCollection.findOne( { "_id": userCollection.objectID( id ) }, function( error, foundUser ){
if( !error )
{
if( callback ) callback( foundUser );
}
else
{
logger.error( request.method + ": Error finding user: " + error );
if( callback) callback( null );
}
});
};
findUser( report.user._id, function( user ){
if( user )
{
logger.info( "user to push: " + user.name );
modules.push.sendMessage( user, "Test from hook" );
}
});
//=====================
The console log shows the user name as the logger.info say. But no notification is sent =/
When I go to the push test console and broadcast the test message to test my configuration, it works!
Please, what am I doing wrong?
Also, once you help to fix this, is there any secret to configure custom payloads for push?
Thank you so much!