lundi 30 mars 2015

How can i send spanish message as a single message by using twilio

I can send SMS message (multiple lines in english) as a single message by using twilio but When I send SMS message(same message) with Spanish translations, the message will get chopped into three messages on the recipients phone. How can i send it as single message.


This is my code



public String sendSmsToUser(String to, String body) throws TwilioRestException
{
try
{
TwilioRestClient client=new TwilioRestClient(“**************”, “***************”);

// Build a filter for the MessageList
List<NameValuePair> params = new ArrayList<NameValuePair>();

params.add(new BasicNameValuePair("Body", body));
params.add(new BasicNameValuePair("To", "+"+to));
params.add(new BasicNameValuePair("From", twilioConfigBean.getFromNumber()));
MessageFactory messageFactory = client.getAccount().getMessageFactory();

Message message = messageFactory.create(params);

Message messageStatus=client.getAccount().getMessage(message.getSid());
return messageStatus.getSid()+"-"+messageStatus.getStatus();
}
catch(Exception e)
{
e.printStackTrace();
return "error-"+e;
}
}


This is my message body


Please log in to the XYZ app with the following information:Your phone number is 1234567890 Your temporary password is 1234 Do not reply to this message.


Same message in spanish is


Por favor ingresa a la app XYZ con la siguiente información:Tu número de celular es 1234567890 Tu contraseña provisional es 1234 Favor no responder a este mensaje.


Please help me guys


Aucun commentaire:

Enregistrer un commentaire