Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • R REVECallSDKSample
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sdk
  • REVECallSDKSample
  • Wiki
  • Home

Home · Changes

Page history
Update home authored Nov 13, 2021 by Sourav Das's avatar Sourav Das
Show whitespace changes
Inline Side-by-side
Showing with 102 additions and 9 deletions
+102 -9
  • home.md home.md +102 -9
  • No files found.
home.md
View page @ 2eabd713
# **How To configure and use [Reve Systems](https://www.revesoft.com/) Voice Call sdk in your custom Android App**<br> # **[Reve Systems](https://www.revesoft.com/) Android Voice Call SDK: Configuration and Usage**<br>
Follow the Steps below to Implement the Reve Voice Android SDK for your own Dialer App<br> Reve Voice SDK for Android provides you with the Oppurtunity to make VOIP (Voice over Internet Protocol) Calls and Peer to Peer calls.<br>
**Step 1.Gradle:** Firstly you have to add the gradle dependency in your app’s build.gradle file. You can add the following line inside the dependencies{} tab to the aforementioned file to get access to the necessary packages. Sync your project after that.<br> Follow the steps below to integrate Reve Voice SDK with your native android app.
**`api 'com.revesoft.sdk:reveSdk:1.6.1-4' .`**
**Step 2. Configuration:** In this step you need to configure the AppConfig according to the Configuration provided to you by Reve Systems. Check out the Detailed **[Configuration Guide](App-Configuration)** **Step 1. Installation:** In the build.gradle in your project file, make sure you have the following items
```groovy
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
```
You will need both **mavencentral()** and **google()** repositories for this project. Also use ```classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"``` if you intend to use Kotlin in your project.
<br>Now in your **settings.gradle** file you need to add the following maven repository
```groovy
repositories {
google()
mavenCentral()
jcenter()
maven {
url "http://maven.alalamin19.com:8081/artifactory/libs-release-local"
allowInsecureProtocol(true)
}
maven { url 'https://jitpack.io' }
}
```
Finally add the following line in your **app/build.gradle** file's dependencies tab
```groovy
dependencies {
...
implementation 'reve-voice-sdk:1.0.0'
...
}
```
**Step 2. Configuration:** In this step you need to configure the AppConfig according to the Configuration provided to you by Reve Systems.
Your app has to be configured exactly as the credentials and attributes provided, otherwise you will not be able to connect to the server properly. You have to build an instance of the class AppConfig and pass it to the `SIPWrapper.restartSIP(context: Context, appConfig:AppConfig)` method. You have to build an instance the following way.
>In kotlin
```kotlin
var myConfigBuilder = AppConfig.newBuilder()
.withDialerName("SDK_DIALER")
.withDialerType(DialerType.EXPRESS_PLATINUM)
.withOpCode("19189")
.withDialerVersion("1.0.0")
.withDefaultCountry("bd")
.withVersionCode(1)
.withSDKClientCredentials("operator1", "1234")
var appConfig = AppConfig(myConfigBuilder)
```
>In Java
```java
MyConfigBuilder myConfigBuilder = AppConfig.newBuilder()
.withDialerName("SDK_DIALER")
.withDialerType(DialerType.EXPRESS_PLATINUM)
.withOpCode("19189")
.withDialerVersion("1.0.0")
.withDefaultCountry("bd")
.withVersionCode(1)
.withSDKClientCredentials("operator1", "1234");
AppConfig appConfig = new AppConfig(myConfigBuilder);
```
<!Check out the Detailed **[Configuration Guide](App-Configuration)**>
**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.
...@@ -12,11 +83,33 @@ Follow the Steps below to Implement the Reve Voice Android SDK for your own Dial ...@@ -12,11 +83,33 @@ Follow the Steps below to Implement the Reve Voice Android SDK for your own Dial
UserInfo.setUsername(AppUI.getusername()) UserInfo.setUsername(AppUI.getusername())
UserInfo.setPassword(AppUI.getSipPassword()) UserInfo.setPassword(AppUI.getSipPassword())
``` ```
**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 get an instance sipwrapper of the Class **SIPWrapper** and then call the function `sipwrapper.restartSIP(context: Context, appConfig:AppConfig)`. This method starts the components that lets you start/receive and end calls. Here context should 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.restartSIP(context: Context, appConfig:AppConfig)`. This method starts the components that lets you start/receive and end calls. Here context should 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 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.
**Step 5. Permission:** Make sure your app has permission to **record Audio**. Otherwise no audio data will be sent via this app.
<br>Add the following line in your Manifest file
```xml
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
```
You can use the following code snippet to check for permission and ask for permission if it is not already greanted.
```kotlin
private fun checkAndRequestPermissions() {
if (ContextCompat.checkSelfPermission(applicationContext,
android.Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED
) {
ActivityCompat.requestPermissions(this, arrayOf(android.Manifest.permission.RECORD_AUDIO), 101)
}
}
}
```
**Step 6. Call Handling:** The aforementioned `SIPWrapper.restartSIP(Context,AppConfig)` function will initialize **CallHandler**, a class for all types of call related activites. You can now make a call by simply calling `CallHandler.makeCall(number:String, isPaid:Boolean)`
function and end call by calling `CallHandler.endCall()` function. You can receive Peer to Peer calls by using `CallHandler.acceptCall(callid:String)`.
Check out the **[Call Handling guide](Call-Handling)** for details on Handling of calls using this SDK.
**Step 5. Call Handling:** Check out the **[Call Handling guide](Call-Handling)** for Handling the calls using this sdk.
**Step 6. Permission:** Make sure your app has permission to **record Audio**. Otherwise no audio data will be sent via this app.
### Check out the [Demo App](Demo-App) for using this SDK ### Check out the [Demo App](Demo-App) for using this SDK
Clone repository
  • Call Handling
  • Configuring Listeners
  • Demo App Details
  • Get Api Key
  • Other Important Topics
  • Home