Sending and receiving own message - google-play-games

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.

Related

How do I notify users on Slack that aren't in the channel?

What we are trying to do
I am working on automation which posts messages to a Slack channel using Incoming Webhooks on a custom Slack App. The messages mentions people.
What works
We can send a message just fine, it has formatted content, and usernames are correctly resolved using the link-names flag.
What isn't working
The whole point of the notification is to inform a dynamic set of people about something they should care about. The set of people we tag varies hugely (think people who contributed to a pull request) and so not all possible recipients are in the channel these automated messages go to.
We assumed that given the usernames are being directly #-mentioned, they would be notified by Slack. However, two of the users we've tested with and #-mentioned confirm they never received a notification they had been tagged.
This is different to "human" behaviour, where if you #-mention someone in Slack, you get a little message reminding you that person isn't in this channel and offers to invite them or let them know.
As far as we can tell, sending the message programmatically is doing the equivalent of "Do nothing" in the picture above. I want to do either of the other two options, preferably "Let them know".
How can I notify people they've been mentioned? I've looked at all the API documentation and nothing discusses notifying users who aren't in the channel that they are mentioned.
This can't be an uncommon issue.... right?
Notes:
We aren't directly calling chat.postMessage, it's just the only documentation on link_names I could find to link to. We are using Incoming Webhooks, which has minimal documentation on the parameters - it seems to be the same as chat.postMessage.
We would prefer not to move off Incoming Webhooks, but we can do a custom integration with the API if we have to.
You need to invite the user to the channel first, using the Python client that's:
client.channels_invite(
channel=channel_id,
user=user_id
)

Automated/Bot message posting to Microsoft-Teams chat room

How can I automatically post messages to chat rooms in Microsoft-Teams? This is for one-way messaging: i.e. posting messages, not reading messages.
The big picture here is we are evaluating different Group Chat solutions, and one requirement is to post error messages to chat rooms from various services & programs.
A sensible approach seems to be to build a Bot using the REST API however just the authentication seems crazy complex, even then I can't work out how to just post a message. We're looking for a general solution that can be used simply in different scripting languages (Perl, Python, shell scripts, etc), so we don't want to use the .NET SDK or Node.js SDK.
We've already looked at Slack and Cisco Spark. Posting messages in both of these is super simple, so I'm hoping there's a similarly simple solution for Microsoft-Teams?!
For example:
In Slack you can use incoming webhooks to post messages. You use the web interface to get a unique webhook URL for each chat room, and then do simple HTTP POST to that URL (with a JSON message payload) to post to that chat room as the Bot. I had it working in 10 minutes.
In Cisco Spark you create a Bot which gives you a unique Access Token. You then get a room_id for the chat room and use those together to do an HTTP POST (again with a JSON payload) to create a message in the chat room.
So how do you programmatically post/create/send messages to a chat room in Microsoft-Teams?
The simplest way to do what you want is to post a message to a channel using an "Incoming Webhook" connector. For more information, see here: https://msdn.microsoft.com/en-us/microsoft-teams/connectors?f=255&MSPPError=-2147217396#setting-up-a-custom-incoming-webhook
What you're describing is precisely how the Office 365 Connectors work. A Connector allows you to post messages into a Group or Team using web-hooks and a simple JSON payload.
There is a playground for playing with these that is super helpful. One note however, there is a bug in the playground's webhook implementation, so for testing purposes, I would stick to the Send via Email option. This doesn't affect how these work in production, the bug is isolated to the Playground app itself.

Debugging Google cloud messaging push messages

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.

SMS receiving confirmation

I am trying out different things with Twilio, but open for other solutions with Nexmo, Tropo or Plivo.
Here's a situation, I am sending an SMS texts from a server to bunch of clients. I can get a status back: like queued, sending, sent, or failed. Here's what Twilio says about SMS sent status:
"Sent" indicates that your message was successfully sent into the SMS
network for delivery. However Twilio does not receive confirmation from
the destination carrier that the message was received, and this is not
a guarantee that the message has reached the intended device.
(https://www.twilio.com/help/faq/sms/what-do-the-sms-statuses-mean)
So, my question is: does Plivo, Tropo or Nexmo (or any other service that I missed) do anything like that? I mean, knowing that an SMS was received either by client directly, or client's carrier would be really important.
PS. I'm not even sure if it is possible
Any help or suggestions would be appreciated.
It's certainly possible with Nexmo - as the other answer and comment state, it's not possible with Twilio & Tropo. Plivo's docs look like their delivery receipts are similar to Nexmo's.
Nexmo sends a delivery receipt if it's supported by the carrier. In the US it's not, but internationally it is supported often. In those cases Nexmo will give your app a callback with a delivery receipt. You can also use the message ID to query for the message status.
This screencast shows checking the DLR from the dashboard, which is really just a UI on top of the API.
Kevin makes the point that this could be difficult if the message is bounced through multiple providers - one of Nexmo's focuses is getting as direct a connection as possible.
[Disclaimer: I do occasional developer evangelism for Nexmo.]
I'm a Tropo customer, and I've asked the same question, and so far, the answer's similar to what Kevin Burke gave for Twilio. It's hard to do, so there's no confirmation at this time. They do give some debugging information in the logs which is helpful with that first-hop negotiation, at least, even if it's hard to retrieve/parse easily. They are working on it, and have been very active adding new features.

Unable to get delivery notification using Wire2air API

I am using wire2air api for sending bulk sms and polling. but unable to get the delivery status for SMS.
I also have a look out their documentation here http://www.wire2air.com/developer_apis.asp
but unable to find any help from it.
also for replypath parameter in APi it is mentioned that "ONLY available in advance developer API."
So also not able to know what advance developer APi. is do i need to purchase different plan for it.
Any help on this is Appreciated.
Amit,
In order to get real-time delivery status from wire2air, you would need to implement their real-time delivery reports webservice. You should contact wire2air support, to activate the feature. If you're using a shared short code, Replypath is only used for receiving replies back to your server, this allow end users to reply to text message without using keyword.
--Sam

Resources