Nexmo inbound sms - java

i have a question about Nexmo SMS and about nexmo java client.
I have one virtual number, and I want to send from it to person A. Also, I have send and specyfing that it was sent from "Ajris". Then, i would like to send another message to that person and specify that it was sent from "Iris". So person A has two messages, one from Ajris and one from Iris. When she replies to the message, how am I supposed to know which message did she responde to? As I have checked there aren't any fields in InboundMessage API in Nexmo which allows me to connect received message to the sent one. Is there any chance to do it?

Because person A sends the SMS from a phone using a native client, you can not control the information being sent with the SMS message. There is no information associated with that SMS, so there is no data you can use to correlate it to the message being replied to.
One way to get around that limitation is to use two Nexmo Virtual Numbers instead of one, so when person A replies, you can correlate based on the Nexmo Virtual Number used.

For what you're looking to do - you would need multiple Nexmo Numbers. You can then pull the to field out of the Inbound SMS and use that to map between the two distinct individuals.

Related

How to obtain sent SMS price

Is there way on Android to obtain cost of SMS after sending it programmaticaly?
It would be really nice to know.
Thing is that for example my carrier always sends notification back with remaining credit, but I cannot rely on that every carrier does the same, and parsing it wouldn't be good idea anyway, as there are many different languages in world and text might be formatted differently depending on carrier.
Unfortunately there's no way to determine that as it's all handled on the network side.
There is impossible to determine pricing on subscriber site using standard android SDK API, price known only on operator's side inside its billing system. But, maybe your mobile operator provides an API for receiving bills and only then you it will be possible to define price you charged.
Also, if it is possible to check your balance using USSD or SMS, you may try requesting balance before sending SMS and after.

Senting bulk mails to recipient individually using Java Mail API

I need to send dozens or hundreds of people the same message without having to display everyone's e-mail addresses.
Also I need tracking of respective action made to the each mail which i have sent (i.e., received status, open status, etc)
Say i am sending message 1000 recipients in a fashion of 50 reciepient at one time.
While i am sending the email in BCC mode, i can achieve that the same message sent to dozen of people without having to display everyone's e-mail addresses. But here i didn't able to track the respective action made to the each mail which i have sent.
while i amd sending the email in Normal mode, I can achive the both but it takes to long time to process all the 1000 recepients.
Is there is any better way to accomplish the both items which i need?
if so can you share with us to over come the problem.
I answered your question on the OTN Forum. Here's my response:
The only better way is to contract with a bulk mail service that will do all this for you.
Whether you can do better may depend on what exactly you mean by "track the respective action made to the each mail". If you want to know whether each recipient received the message or replied to the message, you need to send a different message to each recipient with some personally identifiable information. If you only want to know whether the message was delivered to each recipient successfully, and you're willing to depend on Delivery Status Notifications (which not all mail servers support), you can determine from the returned Delivery Status Notification whether delivery was successful or not for each recipient. But again, some servers won't return DSNs at all, and some won't return them in the standard format.
Also, I assume you've already tried using just a single connection to send a different copy of the message to each recipient, as described in the other answer. If you haven't tried that, start there. :-)
Have a look here: how-to-send-multiple-emails-in-one-session
If today you're using one Session and static Transport.send() per Mail, this could speed things up a lot.

GCM service - dynamic text

1) i would like to implement dynamic text feature in my server side (java - using GCM) - that mean that i need to custom the push body data to every device but i still want to push to multiple devices at one time.
(using multicastResult = sender.send(mess, devicePushTokenList, 3);
any body knows a way to do it in derver side? (i know a way to do it in the device time before the push arrives)
2) i know apple has a feedback service that i can run in any given time + the feedback of the push response. does GCM has this service too?
thanks!
If you want to use multicast messaging, you will unfortunately need to send the same message.
One solution (which I don't really like) would be to have your app request data from your server upon receiving the message and updating the message appropriately.
You're better off sending messages to each device individually.
As the other answer stated, multicast requires all the messages to be identical.
GCM doesn't have a Feedback Service, and it doesn't need to have one, since it returns an immediate response for each pushed message, and one of the error statuses - NotRegistered - covers the case of devices that uninstalled the app (which is what Apple's Feedback Service is for).

Separate information sent via Serial

I recently bought an Arduino with an LCD screen. I want to push information from my computer to the Arduino. I came across a great article, How to make a physical Gmail notifier. From what I understand, I have to send the information using Serial and read it in the C/C++ code on the Arduino. That is fine, but I want to send different information to the device.
Say I want to have one part of the LCD-screen showing the temperature outside and another part of the screen display when the next bus is coming. Is there any way to "mark" the information I send with Serial, or does everything end up in the same "channel"?
If that is the case, is there a logical, simple way to separate this information so it does not mistake bus-information for temperature and vice versa?
You need a protocol for sending information across the serial line, so that the data can be collected the other end in a way that makes sense. A simple protocol may be:
T:16.0 09.34 // Temperature, 16.0°C measured at 09.34
B:11b 11.46 // Bus, route 11b, arrives at 11.46 at your bus-stop.
M:mats#example.com 11kb 10.23 // Mail from mats#example.com, it's 11KB and arrived at 10.23
Each line contains one type of information.
Assuming the line of communication is reliable (and as long as your wire isn't several dozen feet, it should be), you don't need more than that. If the communicatio is unreliable, you need some sort of "start" and "end" markers (or a start and a length), a checksum and some way of dealing with "it went wrong". You will also need to read with a timeout, so that when you don't get enough data, the system starts over again with the next bit of information.
Is there any way to "mark" the information I send with Serial
Definitely. YOU decide how the information is sent if you have control over the information passing over the serial port on your computer.
or does everything end up in the same "channel"?
Well, the serial port is a kind of a channel I guess, since all information you wish to send to the Arduino goes over the port.
is there a logical, simple way to separate this information so it does not mistake bus-information for temperature and vice versa.
Yes. Say you want to send temperature data. Create a byte array for example in this manner: {T23.4} = Temperature data
The bracket '{' signals to the receiving code in the arduino that information is coming down the line with some data. The letter T indicates temperature. Everything after the letter 'T' up to the '}' is data. (23.4)
Bus information could be {Bxxx} where xxx is the data.

send SMS using GPRS in MIDlet

i want to send a SMS using GPRS in MIDlet...
anyone can help me??
Thanks in advance...
Sending SMS is a HUGE beast to conquer. Now I don't know the first thing about j2me, but I do know a bit about SMS since I was at one point working on a similar project (abandoned for the reason below).
The short end of it is that you MUST use a GSM carrier to send SMS if you don't know what carrier to send to. This is because carriers know how to send the message to the appropriate cell phone.
You could send via email 5554441234#carrierdomain.com but the problem comes with the fact that you have to know which carrier the phone number points to.
Once upon a time you could tell the carrier by the second set of three digits xxxYYYxxxx (the y's), but you can no longer do this because of phone number portability.
In short, check out Kannel, but you'll still need to send via GSM (you can get PCI cards that hold SIM cards), or you can pay a subscription.

Categories