restcomm-android-sdk icon indicating copy to clipboard operation
restcomm-android-sdk copied to clipboard

Improve Android client API

Open atsakiridis opened this issue 8 years ago • 1 comments

We 're no longer depending on being compatible with Twilio, so let's take a good look on how to improve the API as best as we can. Also:

  • Do we need capability tokens?

Need to brainstorm with team on that

Let's also keep notes of issues we encounter with with current API:

  • RCConnection.setConnectionListener() isn't very intuitive, let's see if we can avoid it somehow
  • Make sure RCConnection.local/remoteMediaType are actually intuitive and if so document them
  • Right now RCConnection.parameters aren't used since we don't yet offer capabilities. But they are misleading, as we pass a set of parameters via RCDevice.connect(), which aren't kept anywhere within RCConnection
  • Consider utilizing broadcast and broadcastReceivers to notify of SDK events, right now the whole thing is very rigid
  • Calling RCClient.listDevices().get(0); to get a reference to RCDevice object in other activities (apart from the activity that initialized it) looks pretty bad. Need to improve that
  • Not sure RCClient is needed as a means to initialize RCDevice. I have the impression it only adds complexity the way we use it. Since we're probably interested for only on RCDevice to be ever available I think we could get rid of it and have a logic more like what we have on iOS. In any case we need to consider this
  • Some callbacks defined at RCConnectionListener & RCDeviceListener might not be needed in an App. Right now it is mandatory that the App implements them all which can be tedious. See if we can work around that.

atsakiridis avatar Oct 07 '15 17:10 atsakiridis

Moving this to next release as we did for iOS

atsakiridis avatar May 20 '16 10:05 atsakiridis