In my Android application, I created one button, when I pressed the button I want to send message.So, for this I created one Java class and wrote twilio code.
final TwilioRestClient client = new TwilioRestClient( ACCOUNT_SID, AUTH_TOKEN); // Get the main account (The one we used to authenticate the // client) final Account mainAccount = client.getAccount(); final SmsFactory messageFactory = mainAccount.getSmsFactory(); final Map<String, String> messageParams = new HashMap<String, String>(); messageParams.put("To", "+912342423423"); messageParams.put("From", "+132432432434"); messageParams.put("Body", "This is my message"); try { messageFactory.create(messageParams); } catch (TwilioRestException e) { e.printStackTrace(); }
when i use the code above it shows some error like java.lang.NoSuchMethodError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
I added only one jar file to the lib folder as " twilio-java-sdk-3.3.10-jar-with-dependencies.jar ".
please tell me what can i do?
android sms twilio
Hanuman
source share