Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.5k 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...