Skip to content

Commit 524ba16

Browse files
committed
updated SDK version to 1.0.15 and integrated a new switch for the speaker or earpiece audio output.
1 parent 23a0950 commit 524ba16

4 files changed

Lines changed: 57 additions & 11 deletions

File tree

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ To use AuviousSDK in your project follow these steps:
1212
maven { url "https://nexus.auvious.com/repository/maven-releases" }
1313
}
1414
```
15-
- Include `com.auvious.android:sdk:1.0.14` dependency. Again if you are using Gradle, then your
15+
- Include `com.auvious.android:sdk:1.0.15` dependency. Again if you are using Gradle, then your
1616
build.gradle dependencies section would look like this:
1717
```groovy
1818
dependencies {
1919
//... other dependencies
2020
2121
// Auvious SDK
22-
implementation 'com.auvious.android:sdk:1.0.14'
22+
implementation 'com.auvious.android:sdk:1.0.15'
2323
}
2424
```
2525

@@ -33,7 +33,8 @@ To use AuviousSDK in your project follow these steps:
3333
"ticket" to edit_ticket.text.toString(),
3434
"grant_type" to "password",
3535
"mic" to "true",
36-
"camera" to "true"
36+
"camera" to "true",
37+
"speaker" to "false"
3738
)
3839
)
3940

@@ -53,3 +54,22 @@ To use AuviousSDK in your project follow these steps:
5354
}
5455
startForResult.launch(AuviousSimpleConferenceActivity.getIntent(this, callOptions))
5556
```
57+
Within the `mapOf()` configuration, there are three options for initializing the microphone, camera, and speaker for the call session. Here's how they work and how to adjust them:
58+
59+
**Microphone Configuration**
60+
- Key: `mic`
61+
- Value: `true` or `false`
62+
- `true`: This enables the microphone, allowing the user to send audio during the call.
63+
- `false`: This disables the microphone, so the user will not be able to send audio. However, they can still hear audio if the speaker is enabled.
64+
65+
**Camera Configuration**
66+
- Key: `camera`
67+
- Value: `true` or `false`
68+
- `true`: This enables the camera, allowing the user to send video during the call.
69+
- `false`: This disables the camera, so the user will not send video. However, they can still see the video from other participants.
70+
71+
**Speaker Configuration**
72+
- Key: `speaker`
73+
- Value: `true` or `false`
74+
- `true`: This enables the speaker, allowing the user to hear audio from other participants.
75+
- `false`: This disables the speaker, so the user will hear sound by device's earpiece.

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ android {
4040
dependencies {
4141
implementation fileTree(dir: 'libs', include: ['*.jar'])
4242
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
43-
implementation 'com.auvious.android:sdk:1.0.14'
43+
implementation 'com.auvious.android:sdk:1.0.15'
4444

4545
implementation 'androidx.appcompat:appcompat:1.7.0'
4646
implementation 'androidx.core:core-ktx:1.13.1'

app/src/main/java/com/auvious/auviousproject/MainActivity.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,29 @@ class MainActivity : AppCompatActivity() {
7474
Toast.LENGTH_SHORT
7575
).show()
7676
} else {
77-
startSimpleConferenceActivity(enableCam = !binding.micOnlySwitch.isChecked)
77+
startSimpleConferenceActivity(
78+
enableCam = !binding.micOnlySwitch.isChecked,
79+
enableSpeaker = binding.speakerSwitch.isChecked,
80+
)
7881
}
7982
}
8083

8184
}
8285
private fun startSimpleConferenceActivity(
8386
enableMic: Boolean = true,
84-
enableCam: Boolean = true
87+
enableCam: Boolean = true,
88+
enableSpeaker: Boolean = true
8589
) {
8690
val callOptions = AuviousSimpleConferenceOptions(
8791
"customer",
88-
"https://dev.auvious.video",
89-
"wss://dev.auvious.video/ws",
92+
"https://auvious.video",
93+
"wss://auvious.video/ws",
9094
mapOf(
9195
"ticket" to binding.ticketText.text.toString(),
9296
"grant_type" to "password",
9397
AuviousSimpleConferenceOptions.microphoneOption to enableMic.toString(),
94-
AuviousSimpleConferenceOptions.cameraOption to enableCam.toString()
95-
98+
AuviousSimpleConferenceOptions.cameraOption to enableCam.toString(),
99+
AuviousSimpleConferenceOptions.speakerOption to enableSpeaker.toString()
96100
)
97101
)
98102
activityForResult.launch(AuviousSimpleConferenceActivity.getIntent(this, callOptions))

app/src/main/res/layout/activity_main.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,28 @@
8989
app:layout_constraintStart_toEndOf="@id/mic_only_title"
9090
app:layout_constraintTop_toTopOf="@id/mic_only_title" />
9191

92+
<com.google.android.material.textview.MaterialTextView
93+
android:id="@+id/speaker_title"
94+
style="@style/TextAppearance.AppCompat.Body1"
95+
android:layout_width="wrap_content"
96+
android:layout_height="wrap_content"
97+
android:text="Audio to Speaker"
98+
app:layout_constraintBottom_toBottomOf="@+id/speaker_switch"
99+
app:layout_constraintEnd_toStartOf="@id/speaker_switch"
100+
app:layout_constraintHorizontal_chainStyle="spread_inside"
101+
app:layout_constraintStart_toStartOf="parent"
102+
app:layout_constraintTop_toBottomOf="@id/speaker_switch"
103+
app:layout_constraintTop_toTopOf="@id/speaker_switch" />
104+
105+
<com.google.android.material.switchmaterial.SwitchMaterial
106+
android:id="@+id/speaker_switch"
107+
android:layout_width="wrap_content"
108+
android:layout_height="wrap_content"
109+
android:checked="false"
110+
app:layout_constraintEnd_toEndOf="parent"
111+
app:layout_constraintStart_toEndOf="@id/speaker_title"
112+
app:layout_constraintTop_toBottomOf="@id/mic_only_switch" />
113+
92114
<com.google.android.material.textview.MaterialTextView
93115
android:id="@+id/perm_title"
94116
style="@style/TextAppearance.AppCompat.Medium"
@@ -98,7 +120,7 @@
98120
android:text="Permission options"
99121
app:layout_constraintEnd_toEndOf="parent"
100122
app:layout_constraintStart_toStartOf="parent"
101-
app:layout_constraintTop_toBottomOf="@id/mic_only_title" />
123+
app:layout_constraintTop_toBottomOf="@id/speaker_switch" />
102124

103125
<com.google.android.material.button.MaterialButton
104126
android:id="@+id/request_camera_perm"

0 commit comments

Comments
 (0)