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.
Hello Billy,
Thanks you for your answer and assistance.
Here are the answer to the questions:
What is the name of the app ?
- The application name is LifeSafe.
and what is the KID of the environment where you are experiencing this problem?
- The environment is LifeSafe, in development.
Which Kinvey SDK and version number are you using?
I use the Android Kinvey SDK, version number: kinvey-android-2.10.11
TimeFrame:
I sent push notification between this timeFrame:
NFO 04/12/17 10:20:14 am
INFO 04/12/17 10:21:08 am
Here is my code, i successfully get users but pushMessage have no effect:
function onRequest(request, response, modules){
var collectionAccess = modules.collectionAccess;
var utils = modules.utils;
var push = modules.push;
var template = '{{name}}, the {{team}} just won!';
var pushedMessageCount = 0;
var userCount;
collectionAccess.collection('AllUsersBase').find({_id: modules.collectionAccess.objectID(request.body.id)}, function (err, userColl) {
if (err) {
modules.logger.info('Query failed: '+ err);
} else {
userCount = userColl.length;
userColl.forEach(function (user) {
// Send the push
modules.logger.info("Send to "+ user.Username);
push.sendMessage(user, "test Message Push LifeSafe", function(err, result) {
response.continue();
});
pushedMessageCount++;
// reduce the number of users left to push to
userCount--;
if (userCount <= 0){
// We've pushed to all users, complete the request
response.body = {"message": "Attempted to push " + pushedMessageCount + " messages."};
response.complete(200);
}
});
}
});
}
Thanks you very much for your help.
Best,
Franck"
Thanks,
Pranav
I didn't find solution on my side, i checked all the settings, endpoint code but still not working.
I can't wait to know where the problem come from.
Thanks you.
Franck
Hello Franck,
Regarding your Android Push Notification problem, you reference "TokenFirebase" in the custom endpoint "Push". Can you tell me if you are attempting to use Google Firebase to send these push notifications? When you setup your Android app to use Push Notifications did you follow the setup instructions regarding Google Cloud Messaging in the following document?
http://devcenter.kinvey.com/android/guides/push
I'm asking this because Kinvey does not yet support Firebase.
Regards,
Billy Gee
Hello Billy,
Thanks your for your answer,
The custom endpoint i'am using is called "point" (the code is exactly the same as above in this topic). In the past yes i did used firebase to send push notification and i received it. Right now i want to use Kinvey push notification because there is a nice "business logic".
I implemented the Kinvey client and push Receiver, I receive push notification (send via business logic) when i use the function broadcastMessage() and broadcastPayload(), but my wish is to send to specific users, and when i try to use sendMessage() or sendPayload() it doesn't work, no notification is receive and nothing seems to be sent.
I invite you to take a look at the code just above.
Thanks you very much for you help, really appreciate.
Regards
Hello Franck,
I want to check the details of your push attempts with our push service.
Please send me a direct email to billy@kinvey.com and pranav@kinvey.com for security reasons and please include the following information.
Hello Billy,
I send you an email with all the asked informations.
Thanks you for your support.
Regards
Franck G
Hello,
I'am currently setting up push notification, i created a endpoint called by my android app. In my endpoint code, when i use "push.broadcastMessage" or "push.broadcastPayload" i successfully receive notification. But in my case i would like to send to specific users, so i tried to use "push.sendMessage" and "push.sendPayload", and in the two cases i don't receive notification.
Here is my forEach to get user, i've one user, but sendMessage do not work.
sendMessage callback "err" return null.
userColl.forEach(function (user) {
modules.logger.info('Pushing message to ' + user.Username);
push.sendMessage(user, "People who are named are awesome!", function(err, result) {
});
Do you know where is the problem?
Thanks a lot for your help.