jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

I can't make it work. #30

Closed onigetoc closed 9 years ago

onigetoc commented 9 years ago

Do you have a full working example with all sdk and index.html page? i tryed with this example: https://github.com/jefflinwood/TwilioClientPhoneGapExampleApp But if i don't add the script to. http://static.twilio.com/libs/twiliojs/1.2/twilio.min.js Nothing happend. and if i add it, it won't work as a Android app.

jefflinwood commented 9 years ago

Hi,

You'll need to install the plugin into your PhoneGap project first. Thanks!

ghost commented 8 years ago

I am also having difficulty with this. These are the steps i followed.

  1. Installed plugin using cordova plugin add https://github.com/jefflinwood/twilio_client_phonegap.git 2.Downloaded and placed the Twilio Client Java libraries platforms/android/libs
  2. Downloaded and placed android-support-v4.jar in platforms/android/libs

But i was getting Twilio is undefined on calling setup Twilio.Device.setup(token); So i copied tcPlugin.js and placed it in the js file and included it in the index.html.Now there is no undefined error but the Twilio.Device.ready is not getting called(maybe there is a [robelm because there is two js files).But the success callback in TwilioPlugin.Device.prototype.setup is getting called.Also nothing happens on Twilio.Device.connect

jefflinwood commented 8 years ago

Hi,

It sounds like a Javascript error - possibly if there are two tcPlugin.js files included in your index.html?

ghost commented 8 years ago

No. I have only one tcPlugin.js in index.html (i have attached an image of the file). I deleted the copied version of the file in the js folder.But still nothing happens.

untitled

jefflinwood commented 8 years ago

Ok - can you try the HTML and JS from the example app in your project and see if that works?

On Tuesday, July 21, 2015, Inferner notifications@github.com wrote:

No. I have only one tcPlugin.js in index.html (i have attached an image of the file). I deleted the copied version of the file in the js folder.But still nothing happens.

[image: untitled] https://cloud.githubusercontent.com/assets/7397636/8797637/63aa5c6a-2fba-11e5-8934-c50aa726b35d.png

— Reply to this email directly or view it on GitHub https://github.com/jefflinwood/twilio_client_phonegap/issues/30#issuecomment-123250053 .

ghost commented 8 years ago

I am so sorry. I just didn't set up the Twilio API properly. I tried setting up the web api first and now i understand and it works. Thanks a lot for the plugin.

jefflinwood commented 8 years ago

Great! Glad to hear it wasn't an issue with the plugin or your code.