... | @@ -81,8 +81,8 @@ Follow the [Instructions](Get-Api-Key) to get your own API Key. |
... | @@ -81,8 +81,8 @@ Follow the [Instructions](Get-Api-Key) to get your own API Key. |
|
**Step 3. Setting User Credentials:** Set the username and Password of the end user in UserInfo class. Taking these two pieces of information from the UI is recommended.
|
|
**Step 3. Setting User Credentials:** Set the username and Password of the end user in UserInfo class. Taking these two pieces of information from the UI is recommended.
|
|
|
|
|
|
```kotlin
|
|
```kotlin
|
|
UserInfo.setUsername(AppUI.getusername())
|
|
UserInfo.setUsername("[Your User Id]")
|
|
UserInfo.setPassword(AppUI.getSipPassword())
|
|
UserInfo.setPassword("[Your Password]")
|
|
```
|
|
```
|
|
**Step 4. Starting the Call Functionalities** At this stage The configuration of the App is complete. Now you can start to activate the functionalities of this sdk. You have to call the function `SIPWrapper.startSIP(context: Context, appConfig:AppConfig)`. This method starts the components that lets you start/receive and end calls. Here context is recommended to be the default applicationContext and the appConfig is what you created in **Step 2.**
|
|
**Step 4. Starting the Call Functionalities** At this stage The configuration of the App is complete. Now you can start to activate the functionalities of this sdk. You have to call the function `SIPWrapper.startSIP(context: Context, appConfig:AppConfig)`. This method starts the components that lets you start/receive and end calls. Here context is recommended to be the default applicationContext and the appConfig is what you created in **Step 2.**
|
|
If all the configuration is ok, this function will start the core components of this sdk. You have to make sure that you are using the exact configuration provided by Reve Systems. You can call this method inside an activity or a service.
|
|
If all the configuration is ok, this function will start the core components of this sdk. You have to make sure that you are using the exact configuration provided by Reve Systems. You can call this method inside an activity or a service.
|
... | @@ -90,10 +90,58 @@ If all the configuration is ok, this function will start the core components of |
... | @@ -90,10 +90,58 @@ If all the configuration is ok, this function will start the core components of |
|
**Step 5. Permission:** Make sure to ask for permissions for Audio record and Make Calls in your app. Otherwise the sdk wont work.
|
|
**Step 5. Permission:** Make sure to ask for permissions for Audio record and Make Calls in your app. Otherwise the sdk wont work.
|
|
|
|
|
|
**Step 6. Call Handling:** The aforementioned `SIPWrapper.startSIP(Context,AppConfig)` function will initialize **CallHandler**, a class for all types of call related activites. You can now make a call by simply using `CallHandler.makeCall(number:String)`
|
|
**Step 6. Call Handling:** The aforementioned `SIPWrapper.startSIP(Context,AppConfig)` function will initialize **CallHandler**, a class for all types of call related activites. You can now make a call by simply using `CallHandler.makeCall(number:String)`
|
|
function and end call by using`CallHandler.endCall()` function. You can receive Peer to Peer calls by using `CallHandler.acceptCall(callid:String)`.
|
|
|
|
|
|
|
|
When you are invoking CallHandler.makeCall function, keep a check for `SIPProvider.callState == CallState.READY`. If it is not in ready state, call can not commence.
|
|
Start Call using:
|
|
|
|
|
|
|
|
>In kotlin
|
|
|
|
```kotlin
|
|
|
|
if (SIPProvider.callState == CallState.READY){
|
|
|
|
ReveSdkCallHandler.makeCall(phoneNumber)
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
>In Java
|
|
|
|
```java
|
|
|
|
if (SIPProvider.callState == CallState.READY){
|
|
|
|
ReveSdkCallHandler.Companion.makeCall(phoneNumber);
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
function and end call by using`CallHandler.endCall()` function.
|
|
|
|
|
|
|
|
>In kotlin
|
|
|
|
```kotlin
|
|
|
|
if (SIPProvider.callState == CallState.READY){
|
|
|
|
ReveSdkCallHandler.endCall()
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
>In Java
|
|
|
|
```java
|
|
|
|
if (SIPProvider.callState == CallState.READY){
|
|
|
|
ReveSdkCallHandler.Companion.endCall();
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
You can receive Peer to Peer calls by using `CallHandler.acceptCall(callid:String)`.
|
|
|
|
|
|
|
|
```kotlin
|
|
|
|
if (SIPProvider.callState == CallState.READY){
|
|
|
|
ReveSdkCallHandler.acceptCall(callid)
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
>In Java
|
|
|
|
```java
|
|
|
|
if (SIPProvider.callState == CallState.READY){
|
|
|
|
ReveSdkCallHandler.Companion.acceptCall(callid);
|
|
|
|
}
|
|
|
|
```
|
|
|
|
You can get the callid of an incoming call from Listeners. Check out how to [Implement Listeners]().
|
|
|
|
|
|
Check out the **[Call Handling guide](Call-Handling)** for details on Handling of calls using this SDK and UI integration with Native App.
|
|
Check out the **[Call Handling guide](Call-Handling)** for details on Handling of calls using this SDK and UI integration with Native App.
|
|
|
|
|
... | | ... | |