Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.NoSuchMethodError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager

i integrated twilio api for my android application,but i got below error for whenever run my android application.

java.lang.NoSuchMethodError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnMana ger

i was added my build path below jars.

  1. commons.httpclient-3.1.jar

  2. twilioclient-android-1.1.2.jar

  3. twilio-java-sdk-3.3.14.jar

4 .httpClient-4.12.jar

Thanks

like image 991
user3008032 Avatar asked Apr 16 '26 19:04

user3008032


1 Answers

The existing Twilio client library for Java unfortunately will not do the job for you here - the HTTP client it uses under the covers (commons HTTP client) does not work on Android.

Also, I should point out that you probably do not want to hit the Twilio REST API directly from an Android application that will be installed on an end user's phone or tablet. Your Twilio account credentials would be embedded in the resulting code, and could be extracted by a malicious party.

If you want to make use of the Twilio REST API from an Android app, your best bet is to do so through a server-based proxy. The server-side code could use Twilio to send messages or make calls while protecting your Twilio API credentials.

like image 105
Kevin Whinnery Avatar answered Apr 19 '26 16:04

Kevin Whinnery