I am following Twilio's Android quickstart tutorial for an Android app. Here is the link to the tutorial: https://www.twilio.com/docs/quickstart/php/android-client/make-outgoing-call
I am trying to make an outgoing call. I have set up a trial account with a Twiml application. I have set the URL to the token, and the URL to the /call endpoint that serves Twilio's xml.
I am receiving the token, and the Device object's status is ready.
But whenever I call Device.connect, I get the following errors: Connecting new call failed java.lang.NullPointerExpection at java util.HashMap.
Here is the code I am using:
Connection connection = device.connect(null /* parameters */, null /* ConnectionListener */);
if (connection == null){
Log.e("failed to connect", "Failed to create new connection");
}