Closed gnumbers closed 8 years ago
Hi,
You'd call:
connection = Twilio.Device.connect(params);
It should work in Twilio.Device.ready(function (device) {})
@jefflinwood Thanks for your reply.
But the instance of connection is returned via device
in the callback. I can't really understand it.
Hi,
Take a look at the example app:
https://github.com/jefflinwood/TwilioClientPhoneGapExampleApp/tree/master/www/js
The plugin does work differently from Twilio's JS Client.
Thanks, I will take a look. I forgot to mention that i am using the fork repo of yours. https://github.com/crossroads/twilio_client_phonegap It may be an issue?
So that one looks like they renamed Twilio.Device to TwilioClient.Device, so that could be a factor.
Yes, my code covers it already.
I just created a skeleton cordova project and applied your example project.
It apparently returns connection through the device
variable here.
Twilio.Device.ready(function (device) { console.log (device); // this returns connection $('#statusMessage').text('Ready to start call'); });
I tried to make an out-going call in
device.ready
, but it returns connection instead of device. This is different from Twilio-js. Can anyone help me with this?