Demo App Details
A small demo app is provided with the SDK. You can clone it from here. This app can be helpful for implementing the SDK in your own app.
This demo app follows the steps suggestion from this page. The app's MainActivity starts the SIP functionalities Through the SIPWrappper class with correct configuration. The Demo app is written with Kotlin.
ReveSdkSIPWrapper.startSIP(applicationContext, thisAppConfig)
Main Activity also hosts all the log in and log out logic. Main activity's workflow can be characterized as a linear progression described as below.
- Check & ask for Audio Recording Permission
- Build AppConfig.
- Start SIP.
- Start the service that Listeners for Incoming calls
- Let user start any Outgoing Call Activity.
- Log in and out of accounts.
The App has a CallWindowActivity Class. This is launched when the user starts an outgoing call or when an Incoming call is made with the user as receiver. User can Accept or Decline Incoming call and End the outgoing calls From here. This Activity also stores Log data to the room database.
Main Activity uses MainViewModel and CallWindowActivity uses CallViewModel to access the call log database. We encourage you to use your own database as the Room Database used here is locally stored and the user will lose all the call logs if somehow the local logs are deleted.
MainActivity
In this activity You can start an outgoing call by typing the number in the editText and then clicking the call button. On top of the layout current registration state and current balance are shown.
Finally You can Change Login Credentials from the panel below as well as view call logs.
CallWindowActivity
This Activity is shown when there is an active call going on which may either be incoming or outgoing. End Call Button ends any call but Accept Call button only shows up it is an incoming call. The Call states durations etc. are shown up in this layout.