I am developing an app that requires communication between other users of the same app. A user might want to invite another user to an event, so the request must be sent directly to a specific user with the event data. If the invitee accepts the invite, the inviter will need to receive a message back to notify and record the acceptance. How would I go about achieving this communication functionality? What are the main pieces to this functionality?
Like you would with any platform, using the network.
The question is how do users discover each other? Vicinity? Common interests?
Either way you will need to create a server to which the apps connect via a web service with the proper information (e.g. location, common interests etc.) then the server can return the identifier for the appropriate match and facilitate communication between them.
Related
I'm trying to figure out if there is a way to uniquely identify the conversation an SMS is replying to without having to buy a new 'from' phone number each time. I know that one can store whatever you want in cookie or session storage, but those both expire in different ways. What I really want is somehow to pass or use an existing unique id for each separate conversation. So that I can map the messages to the right conversations.
I'm not sure but I wonder if its possible to send a expireless unique identifier to a webhook. So that I know which conversation it should be mapped to?
If not is there some way to use the conversation api to achieve the effect of tracking which sms messages belong to which conversations?
A common challenge, since SMS is a stateless, is to try and match up the specific request with the response. Twilio Studio's Send and Wait for Reply widget does this by only allowing one sent message (to the destination number) until there is a response OR the configurable timeout parameter expires, and then moving to the next widget, so keeping state of the interaction.
As you said, if you are attempting to have multiple simultaneous threads to the same destination phone number, you will need to use a unique From number to separate out the threads - from the received parties perspective, they don't see threading in their SMS client, and cannot pick which question to respond to.
Best Practices for SMS Message Logging
Additional Questions Q: Can a user send a customer identifier for a
message, or is only the Twilio-defined SID available?
A: Only the Twilio-defined SID is available.
I am creating a chat application with Node.JS's Socket.IO and there is a couple things I need clarification on.
I am implementing offline messaging in my app meaning that when a user opens the app he will receive all the messages he missed when they were online.
This is my approach:
1) Client opens the app and is subscribed/joins a room
2) The client sends a message to Socket.IO
3) Socket.IO inserts the message in some kind of database/datastore
4) When client tries to retrieve the messages it is pulled from the database/datastore and saved on the users phone then it is deleted from the database.
Is this a correct approach?
I was looking at online and some people suggested using task/message queues like Google App Engines Task Queue but I am not sure how this works.
Your approach sounds OK, but I wouldn't delete messages from a DB, at least not immediately after the client receives them.
From your question it seems that you're not currently saving the messages to a database.
This approach has some drawbacks; for example, the user can't view their chat history on a device that was not connected when some of the messages were sent.
There are 2 ways I can think of to do it in a more elegant manner:
Save all messages to DB. on websocket connection and reconnections, fetch all messages newer than your latest message (This approach assumes no edit functionality in your chat, as edits will not be fetched this way). The latter can be implemented using either HTTP or WebSockets.
If you don't want to store the messages in your server, then you should implement some sort of persistent cache in the device used to send the messages. This is very similar to your original solution, except that instead of storing the messages in a database, you're storing them on the user's device. this does require some logic to detect when messages are received, and when the recipient reconnects, in order to trigger sending the missing messages.
The first approach is much better for the general use case in my opinion, but it depends on your use case.
I'm currently researching about how to make an iOS VoIP app and I wondering how user1 of Skype, Viber, Facebook Messengers... can reach to other user in contact list? In my case, the users can request a call to admins. Then admins can call back to them with their IP address they were request to server.
The big problem is if users connected to a Wi-Fi to request a call to server, app will send their ip address to admins. But if they have to connected to another Wi-Fi, their IP address will difference with the older.
I don't know how to check when user's IP was changed. And how to update the IP if it occurs. Does anyone faced this problem and can you guys give me some solution about this problem?
For this you have to configure many things.
Usually Skype, Viber, Facebook Messengers configure things like below.
Ideally there should be target on specific IP or something.
That end point to get connect in video call has to configured and come from server end
https://www.vidyo.com/ is really good platform, though have SDK in C++ so in any technology you can configure it easily
To know online / offline user's, better approach is websocket
list of user will also based on websocket or API response
Good platform for websocket - https://github.com/tidwall/SwiftWebSocket
Pushkit is also required thing, when app is in killed ( Terminated ) state then using pushkit silent notification with local notification you can notify user about incoming call
I'm implementing an XMPP Chat and I was wondering if there is any XEP regarding lists of conversations (like WhatsApp). With message archiving, the clients can retrieve the message history with a given user, but if they open the application for the first time, they doesn't know which users they've previously talked to.
I use ejabberd as my server.
Unfortunately, I do not know of such a XEP. Most XMPP systems assume you will have a roster. Then, it's easy to fetch chat history between you and a particular user just by querying the Message Archive (XEP-0313) with that user's JID.
That being said, I also believe a roster-agnostic Chat-partners XEP would be nice to have.
I'm planning to do an BB app. But I don't know if it is possible. I ask for your recommendation.
It will consist of two apps.
The first: the user will download it. He will be subscribed to the app, sharing his mobile number, PIN, and mail (could this be done automatically? This is, without the user typing that info and sending it)
The second: the admin will send messages of different nature (sms, mail and/or pin) to the subscribers of the first app.
Summarizing: I would like to send messages (of different kind) to many users. I looked, and, at least, in the BB API is possible to send mails to multiple users. But, how to do it with sms and pin.
Also, how would be the code logic that subscribe the users? Could be done automatically? If not, do I need a dedicated server to store the info of the users? etc.
If you have a more elegant way to achieve what I'm posting, please, let me know.
It sounds like one of your requirements is to originate the messages from a BlackBerry. This may be inefficient and costly.
The best solution to send data to multiple BlackBerry users is the Push Service which you can read about here: http://us.blackberry.com/developers/platform/pushapi.jsp