Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.2k views
in Technique[技术] by (71.8m points)

java - Establish Connection to Call on Twilio using SID on Android

I have an Android app which receives notification of an incoming call. The data I receive includes the Call SID (a 34 character string) representing that ringing call. I need to send the SID to Twilio in order to establish the connection to it and begin chatting with the caller.

I've downloaded the voice-quickstart-android app but it only includes examples for calls coming directly to the app. However I just have a Call SID.

I have tried retrieving the call this way:

Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
com.twilio.rest.api.v2010.account.Call call = com.twilio.rest.api.v2010.account.Call.fetcher(callSid).fetch();

That doesn't work because I get errors like java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; and there are warnings against this method in an Android app due to security concerns.

Anyone have an idea of how to connect to a call using just a Call SID on an Android app?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...