jefflinwood / twilio_client_phonegap

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

A few tweaks to how device status and setup works. #14

Closed peder541 closed 9 years ago

peder541 commented 9 years ago

Most of the SDKs essentially release the device when an empty token is passed to device.setup(), so I figured it made sense to make that a consistent behavior everywhere.

Also, device.setup() isn't guaranteed to leave the device in the ready state, so I added a check to the device's state.

Finally, TwilioPlugin.Device.prototype.status needs to take a function as a parameter, otherwise it doesn't do anything.

jefflinwood commented 9 years ago

Thanks, I'll take a look at this and review it. I appreciate the contribution!