I am trying to send push messages to an android application.
The POST https://android.googleapis.com/gcm/send
seems to succeed and I get something (with some numbers changed) like:
{"multicast_id":9999063399994069899,
"success":1,
"failure":0,
"canonical_ids":0,
"results":[{"message_id":"0:1416520599679103%8d7d198de508343a"}]}
but I don't seem to get the notification on the device...
Is there anything that can be done with the message_id it track it forward ?
Can I somehow tell me if Google actually tired to deliver it to the device and what was the result of the attempt?
I know it's an old question and you might have solved it yourself by now, but for completeness I would like to post a solution here.
By now you can find the option GCM Diagnostics in your Google Play Developer Console when you have your app selected. It's placed on the left hand side.
You just post a registration token or a message id and will shortly see a summary of push notifications connected to this token/id, plus additional debug information.
Cheers!
well, at least until someone would provide a better answer about debugging based on message ids.
It turns out the problem in my case was that the phone gap plugin in I was using was expecting a "message" field in the push notification message payload.
A bug on my server side made this message not to exist so it was not displayed in the phones notification area...
my thanks to #Eran for partially pushing my towards the right line of thought.
Related
At work I have to modify an existing Application to differentiate incoming push notifications by the language of the news.
In Android I found a way to not send the push notification. So I could easily check for the language and only send the right one.
In iOS it seems a little different. (I'm not the Author of the existing code, so maybe I have overlooked something.)
But I can't find any function where I could intercept the incoming message.
I tried functions like UNUserNotificationCenter.Current.RemoveAllPendingNotificationRequests();
and
UIApplication.SharedApplication.CancelAllLocalNotifications();
But without any success... maybe I put them into the wrong place.
Thanks for hints and help
If I understand your question, the answer is it depends.
If you cannot change the push notification on the server, then no. The system will display it as soon as it arrives as it is formatted as the notification that needs to be displayed.
However, you can change the format of notification payload so that it doesn't display but it is rather processed by the application. Then you can process it in the app similar to what you do on Android.
I don't want to change the notification. I just don't want to show
it...
I don't think it is possible to choose which notification to show when your app is not running.
If your app isn't running then the notification is processed by iOS and your app doesn't get called.
You can have a look at answer in this thread.
Refer: https://learn.microsoft.com/en-us/xamarin/ios/platform/user-notifications/
Use Case SMS leaves my platform and goes out to a receiver (SMS). I would like to attach some sort of custom identifier so when the user responds back to the SMS..and my platform received the message..I know how to internally route the response back in my platform.
Any ideas?
Maybe set up a system where when the code is sent out
For instance:
Code - 11832
The user then has to enter this code on your website. A program will then match to see if it's the identical code. So you are then able to log the information
No expert on this though and Where is your code ?
Twilio evangelist here.
There isn't really a great way to attach an identifier to the message itself. You could force the user to prepend/append a code in their reply, but depending on your specific scenario that might not be a great user experience.
Another option is to save the to/from phone number as a unique pair when you send the message. Then as your application receives replies you can check the incoming to/from phone number against what you saved.
Hope that helps.
Hi everyone.
I have right now a simple multiplayer game but it is out of sync.
If I could receive my own message from the RealTimeMessageReceivedListener that would be awesome but I can't.
How I am sending my info:
for(Participant p : participants){
Games.RealTimeMultiplayer.sendUnreliableMessage(_gameHelper.getApiClient(),message.getBytes(),roomId,p.getParticipantId());
}
As you can see I'm sending my messages to everyone (even to myself). However at the RealTimeMessageReceivedListener I don't receive any information about my own message.
can you help me with this?
The API does not allow this according to:
the Real-time Multiplayer documentation. See section on Sending Messages. Also, the "sender participant" needs to be excluded if you intend to switch to sending broadcast messages with the API instead;
rationale provided in issue submitted to the Google Play Plugin for Unity project on GitHub.
I am making an event organisation platform. Whenever user creates an event, the candidate gets an email notification as well as sms notification asking whether the suggested time fits or not. The problem is that since it is event organisation, there may be more than one occurance of candidate's mobile phone. So I need to have some unique information to identify to which event candidate is responding to.
I have tried identify using Message SID, but then I realised that Message SID is different on reply message.
So my question would be: is there any way to authenticate to which message candidate is replying to?
Hi Twilio developer evangelist here.
Because every message is idempotent, you wouldn't be able to track them just via the call sid. however, there's way to get around that such as passing a code that goes with each message which you can then read, or using cookies.
I think you are probably going to be more successful using cookies, and luckily enough there is an article on twilio's website that describes just how to do that. And because I noticed you're using PHP, I'm pointing you directly to the PHP article on tracking SMS conversations.
Hope this helps you
I tried the following tutorials to create the push notification in Windows Phone 7.
http://www.sgtconker.com/2010/03/article-windows-phone-7-push-notifications/
http://www.silverlightshow.net/items/Implementing-Push-Notifications-in-Windows-Phone-7.aspx
I can create the channel uri in the WP7 emulator without any error.
However, when I post the push notification from the server to the channel uri. I could only receive the 404 error.
Could anyone give me some help ?
Thanks.
=====
Update 1 (28-Oct):
Thank you very much for the answers.
After I read the latest resources and sample codes, I just sent a push notification to the WP7 emulator successfully.
The channel setup part in WP7 does not change much in the latest SDK.
The problem that I encountered before was from the POST message part of the sender.
The following website is quite useful.
http://www.thisisfanzoo.com/Blog/JeffF/archive/2010/08/02/a-really-long-post-about-the-windows-phone-7-push.aspx
He shows how to correcty build the POST message and it is very critical.
Also the channel uri that created before will expire, when the WP7 emulator (handset) turns off over an hour. Hence, we need to keep track of the channel uri and update the server once it changes.
Have a nice day.
=====
Update 2 (28-Oct):
I just created the POST message using cURL in Linux server, and successfully delivered it to the WP7 emulator by push notification.
Text encoding like ASCII-UTF-8 conversion issue was fixed too.
There were some changes to notification handling through the ctp and beta as Matt advices.
I'd recommend checking out this documentation for an overview, detailed code samples and response codes.
Push Notifications for Windows Phone
How to: Set Up a Notification Channel for Windows Phone
How to: Send a Push Notification from a Web Service for Windows Phone
Also if you'd like to get some more overview I'd recommend checking out the Mix 10 and Tech Ed 2010 NA talks by Peter Torr. If you'd like points in the video to skip forward to I can get these.
The articles you refer to are very old and relate to the Beta and CTP versions of the tools. Unfortunately Push notifications is an area which saw much change before RTM/RTW.
Have a look at the up to date instructions on MSDN at http://msdn.microsoft.com/en-us/library/ff402537(v=VS.92).aspx. I suspect you'll have much better luck with instructions which match the current tools.