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?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…