|
|
# Demo App Details
|
|
|
|
|
|
A small demo app is provided with is SDK to make the SDK even clearer to the USER.
|
|
|
|
|
|
This demo app follows the steps suggestion from [this page](home).
|
|
|
The app's MainActivity starts the SIP functionalities Through an instance of the SIPWrappper class with correct configuration. *The Demo app is written with **Kotlin**.*
|
|
|
```kotlin
|
|
|
sipWrapper = SIPWrapper()
|
|
|
sipWrapper.restartSIP(applicationContext, thisAppConfig)
|
|
|
SIPWrapper.restartSIP(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.
|
|
|
|
... | ... | @@ -17,7 +18,7 @@ Main Activity also hosts all the log in and log out logic. Main activity's workf |
|
|
|
|
|
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 reveiver. User can Accept or Decline Incoming call and End the outgoing calls From here. This Activity also stores Log data to the room database.
|
|
|
|
|
|
Both CallWindow and Main Activity uses MainViewModel 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.
|
|
|
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.
|
... | ... | |