Skip to content

Commit 98d0212

Browse files
committed
update SDK to v1.2.0
1 parent ca4c583 commit 98d0212

4 files changed

Lines changed: 166 additions & 61 deletions

File tree

README.md

Lines changed: 149 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auvious Android SDK Example
2-
This repository contains an example of how to use the AuviousSDK in an Android project.
2+
This repository contains an example of how to use the [Auvious](https://auvious.com/) Android SDK in an Android project.
33

44
To use the AuviousSDK in your project, follow these steps:
55

@@ -14,7 +14,16 @@ To use the AuviousSDK in your project, follow these steps:
1414
}
1515
```
1616
17-
2. Add `https://nexus.auvious.com/repository/maven-releases` as a Nexus repository. If you're using Gradle, add this to your `build.gradle` repositories section:
17+
2. **Minimum SDK Version**: The SDK now requires Android API 23 (Android 6.0 Marshmallow) or higher. Ensure your app's `minSdk` is set to at least 23:
18+
```groovy
19+
android {
20+
defaultConfig {
21+
minSdk 23
22+
}
23+
}
24+
```
25+
26+
3. Add `https://nexus.auvious.com/repository/maven-releases` as a Nexus repository. If you're using Gradle, add this to your `build.gradle` repositories section:
1827
```groovy
1928
repositories {
2029
mavenCentral()
@@ -24,18 +33,53 @@ To use the AuviousSDK in your project, follow these steps:
2433
}
2534
```
2635

27-
3. Include the Auvious SDK dependency. Add this line to your `build.gradle` dependencies section:
36+
4. Include the Auvious SDK dependency. Add this line to your `build.gradle` dependencies section:
2837
```groovy
2938
dependencies {
3039
//... other dependencies
3140
// Auvious SDK
32-
implementation 'com.auvious.android:sdk:1.1.7'
41+
implementation 'com.auvious.android:sdk:1.2.0'
3342
}
3443
```
3544

45+
5. **Required Permissions**: Ensure your `AndroidManifest.xml` includes these permissions:
46+
```xml
47+
<uses-permission android:name="android.permission.CAMERA" />
48+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
49+
50+
<!-- Foreground service - required for Google Play policy compliance -->
51+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
52+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
53+
```
54+
55+
**To disable screen sharing** and avoid the foreground service permissions, set `screenShareAvailability` to `"false"` in your conference options, and you can remove the foreground service permissions from your manifest:
56+
```xml
57+
<uses-permission
58+
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
59+
tools:node="remove"/>
60+
```
61+
62+
6. **Google Play Console Requirements** (for apps targeting Android 14+ / API 34+):
63+
64+
If your app uses screen sharing functionality, you must complete the **Foreground Service declaration** in Google Play Console before publishing:
65+
66+
1. Navigate to: **Play Console → Your App → App content → Foreground service**
67+
2. Declare the `mediaProjection` foreground service type
68+
3. Provide:
69+
- **Description** of screen sharing functionality in your app
70+
- **Video demonstration** showing:
71+
- User action that initiates screen sharing
72+
- Screen sharing in progress with notification visible
73+
- User action to stop screen sharing
74+
- **Justification** explaining the user benefit
75+
76+
**Important**: Google requires video evidence showing the feature is user-initiated. Failure to complete this declaration will result in app rejection during review.
77+
78+
For more details, see [Google's foreground service requirements](https://support.google.com/googleplay/android-developer/answer/13392821).
79+
3680
## Usage Example
3781

38-
To start a conference, use the `AuviousSimpleConferenceActivity` with configurable call options, such as microphone, camera, and speaker settings:
82+
To start a conference, use the `AuviousSimpleConferenceActivity` with configurable call options:
3983

4084
```kotlin
4185
private fun startSimpleConferenceActivity(
@@ -45,7 +89,10 @@ private fun startSimpleConferenceActivity(
4589
availableMicButton: Boolean = true,
4690
availableCamButton: Boolean = true,
4791
availableSpeakerButton: Boolean = true,
48-
customConferenceBackgroundColor: Boolean = false
92+
customConferenceBackgroundColor: Boolean = false,
93+
enablePipMenu: Boolean = true,
94+
enableScreenShare: Boolean = true,
95+
autoEnterPipOnHome: Boolean = true
4996
) {
5097
val callOptions = AuviousSimpleConferenceOptions(
5198
"customer",
@@ -54,64 +101,126 @@ private fun startSimpleConferenceActivity(
54101
mapOf(
55102
"ticket" to binding.ticketText.text.toString(),
56103
"grant_type" to "password",
104+
// Media controls - initial state
57105
AuviousSimpleConferenceOptions.speakerOption to (!enableEarPieceSpeaker).toString(),
58106
AuviousSimpleConferenceOptions.microphoneOption to enableMic.toString(),
59107
AuviousSimpleConferenceOptions.cameraOption to enableCam.toString(),
108+
// Button visibility
60109
AuviousSimpleConferenceOptions.cameraAvailable to availableCamButton.toString(),
61110
AuviousSimpleConferenceOptions.microphoneAvailable to availableMicButton.toString(),
62111
AuviousSimpleConferenceOptions.speakerAvailable to availableSpeakerButton.toString(),
63-
AuviousSimpleConferenceOptions.conferenceBackgroundColor to if (customConferenceBackgroundColor) Color.parseColor("#3366ff").toString() else Color.BLACK.toString()
112+
// UI customization
113+
AuviousSimpleConferenceOptions.conferenceBackgroundColor to if (customConferenceBackgroundColor) Color.parseColor("#3366ff").toString() else Color.BLACK.toString(),
114+
// Picture-in-Picture options (Android 8.0+)
115+
AuviousSimpleConferenceOptions.pipAvailability to enablePipMenu.toString(),
116+
AuviousSimpleConferenceOptions.autoEnterPip to autoEnterPipOnHome.toString(),
117+
// Screen sharing (Android 5.0+)
118+
AuviousSimpleConferenceOptions.screenShareAvailability to enableScreenShare.toString()
64119
)
65120
)
66121
activityForResult.launch(AuviousSimpleConferenceActivity.getIntent(this, callOptions))
67122
}
68123
```
69124

70-
### Option Descriptions
125+
### Configuration Options Reference
126+
127+
#### Media Controls - Initial State
128+
Control the initial state of media devices when joining a conference:
71129

72-
#### Enable default functionality
73130
- **Microphone Configuration**
74-
- **Key**: `mic`
75-
- **Value**: `true` or `false`
76-
- `true`: Enables the microphone.
77-
- `false`: Disables the microphone.
131+
- **Key**: `AuviousSimpleConferenceOptions.microphoneOption` (value: `"mic"`)
132+
- **Values**: `"true"` or `"false"`
133+
- **Default**: `"true"`
134+
- **Description**: Sets whether the microphone is enabled when joining the conference.
78135

79136
- **Camera Configuration**
80-
- **Key**: `camera`
81-
- **Value**: `true` or `false`
82-
- `true`: Enables the camera.
83-
- `false`: Disables the camera.
137+
- **Key**: `AuviousSimpleConferenceOptions.cameraOption` (value: `"camera"`)
138+
- **Values**: `"true"` or `"false"`
139+
- **Default**: `"true"`
140+
- **Description**: Sets whether the camera is enabled when joining the conference.
84141

85142
- **Speaker Configuration**
86-
- **Key**: `speaker`
87-
- **Value**: `true` or `false`
88-
- `true`: Enables the speaker.
89-
- `false`: Enables only the earpiece.
143+
- **Key**: `AuviousSimpleConferenceOptions.speakerOption` (value: `"speaker"`)
144+
- **Values**: `"true"` or `"false"`
145+
- **Default**: `"true"`
146+
- **Description**: Controls audio output routing.
147+
- `"true"`: Uses the speakerphone (loudspeaker).
148+
- `"false"`: Uses the earpiece for private listening.
149+
150+
#### Button Visibility
151+
Control which control buttons are visible in the conference UI:
90152

91-
#### Available conference control buttons
92153
- **Microphone Button Availability**
93-
- **Key**: `mic_available`
94-
- **Value**: `true` or `false`
95-
- `true`: The microphone button will be available for toggling on/off.
96-
- `false`: The microphone button will be hidden.
154+
- **Key**: `AuviousSimpleConferenceOptions.microphoneAvailable` (value: `"mic_available"`)
155+
- **Values**: `"true"` or `"false"`
156+
- **Default**: `"true"`
157+
- **Description**: Controls microphone button visibility.
158+
- `"true"`: Users can toggle the microphone on/off.
159+
- `"false"`: Microphone button is hidden (microphone state is locked to initial setting).
97160

98161
- **Camera Button Availability**
99-
- **Key**: `camera_available`
100-
- **Value**: `true` or `false`
101-
- `true`: The camera button will be available for toggling on/off.
102-
- `false`: The camera button will be hidden.
162+
- **Key**: `AuviousSimpleConferenceOptions.cameraAvailable` (value: `"camera_available"`)
163+
- **Values**: `"true"` or `"false"`
164+
- **Default**: `"true"`
165+
- **Description**: Controls camera button visibility.
166+
- `"true"`: Users can toggle the camera on/off.
167+
- `"false"`: Camera button is hidden (camera state is locked to initial setting).
103168

104169
- **Speaker Button Availability**
105-
- **Key**: `speaker_available`
106-
- **Value**: `true` or `false`
107-
- `true`: The speaker button will be available for toggling on/off.
108-
- `false`: The speaker button will be hidden.
109-
110-
- **Custom Conference Background Color**
111-
- **Key**: `conference_background_color`
112-
- **Value**: [Color](https://developer.android.com/reference/android/graphics/Color) object or a hex color by using the [Color.parseColor()](https://developer.android.com/reference/android/graphics/Color#parseColor(java.lang.String)) method
113-
- Set a custom color in conference background. Otherwise, the default background color will be black.
170+
- **Key**: `AuviousSimpleConferenceOptions.speakerAvailable` (value: `"speaker_available"`)
171+
- **Values**: `"true"` or `"false"`
172+
- **Default**: `"true"`
173+
- **Description**: Controls speaker toggle button visibility.
174+
- `"true"`: Users can switch between speakerphone and earpiece.
175+
- `"false"`: Speaker button is hidden (audio routing is locked to initial setting).
176+
177+
#### Picture-in-Picture (PiP) Options
178+
Control Picture-in-Picture behavior (requires Android 8.0 / API 26 or higher):
179+
180+
- **Manual PiP Menu Entry**
181+
- **Key**: `AuviousSimpleConferenceOptions.pipAvailability` (value: `"pip_availability"`)
182+
- **Values**: `"true"` or `"false"`
183+
- **Default**: `"true"`
184+
- **Description**: Controls whether the "Floating window" menu item is shown.
185+
- `"true"`: Users can manually enter PiP mode via the menu.
186+
- `"false"`: Manual PiP entry is hidden from the menu.
187+
- **Note**: This does NOT affect automatic PiP when screen sharing starts.
188+
189+
- **Automatic PiP on Home Button**
190+
- **Key**: `AuviousSimpleConferenceOptions.autoEnterPip` (value: `"auto_enter_pip"`)
191+
- **Values**: `"true"` or `"false"`
192+
- **Default**: `"true"`
193+
- **Description**: Controls whether the app automatically enters PiP when the user presses the Home button.
194+
- `"true"`: App automatically enters PiP mode when leaving (default behavior).
195+
- `"false"`: App goes to background normally without entering PiP.
196+
- **Note**: Screen sharing always triggers auto-PiP for optimal UX, regardless of this setting.
197+
198+
#### Screen Sharing
199+
Control screen sharing feature availability (requires Android 5.0 / API 21 or higher):
200+
201+
- **Screen Share Availability**
202+
- **Key**: `AuviousSimpleConferenceOptions.screenShareAvailability` (value: `"screen_share_availability"`)
203+
- **Values**: `"true"` or `"false"`
204+
- **Default**: `"true"`
205+
- **Description**: Controls whether screen sharing is available.
206+
- `"true"`: "Share screen" menu item is shown, and users can share their screen.
207+
- `"false"`: Screen sharing feature is completely hidden and disabled.
208+
- **Note**: When screen sharing starts, the app automatically enters PiP mode for optimal user experience.
209+
210+
#### UI Customization
211+
212+
- **Conference Background Color**
213+
- **Key**: `AuviousSimpleConferenceOptions.conferenceBackgroundColor` (value: `"conference_background_color"`)
214+
- **Values**: String representation of an Android Color integer
215+
- **Default**: Black (`Color.BLACK`)
216+
- **Description**: Sets a custom background color for the conference screen.
217+
- **Example**: `Color.parseColor("#3366ff").toString()` for a custom blue background.
218+
219+
- **Participant Name**
220+
- **Key**: `AuviousSimpleConferenceOptions.participantName` (value: `"participant_name"`)
221+
- **Values**: String
222+
- **Description**: Sets a display name for the participant in the conference.
114223

115224
---
116225

117-
With these additional configurations, you have greater control over the UI and functionality within the [Auvious](www.auvious.com) conference experience, allowing you to fine-tune the behavior and appearance for your users.
226+
With these configurations, you have comprehensive control over the UI and functionality within the [Auvious](https://auvious.com/) conference experience, allowing you to fine-tune the behavior and appearance for your users.

app/build.gradle

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212

1313
defaultConfig {
1414
applicationId "com.auvious.auviousproject"
15-
minSdkVersion 21
15+
minSdkVersion 23
1616
targetSdkVersion 36
1717
versionCode 1
1818
versionName "1.0"
@@ -39,16 +39,11 @@ android {
3939
dependencies {
4040
implementation fileTree(dir: 'libs', include: ['*.jar'])
4141
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
42-
implementation 'com.auvious.android:sdk:1.1.7'
42+
implementation 'com.auvious.android:sdk:1.2.0'
4343

4444
implementation 'androidx.appcompat:appcompat:1.7.1'
4545
implementation 'androidx.core:core-ktx:1.17.0'
4646
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
4747
implementation 'com.google.android.material:material:1.13.0'
4848
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
49-
50-
// app-center
51-
def appCenterSdkVersion = '5.0.6'
52-
implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
53-
implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
5449
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
android:name="android.hardware.camera"
77
android:required="false" />
88

9-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
10-
<uses-permission android:name="android.permission.WAKE_LOCK" />
11-
<uses-permission android:name="android.permission.INTERNET" />
9+
<!-- Dangerous permissions - must request at runtime -->
1210
<uses-permission android:name="android.permission.CAMERA" />
1311
<uses-permission android:name="android.permission.RECORD_AUDIO" />
14-
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
12+
13+
<!-- Foreground service - required for Google Play policy compliance -->
14+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
15+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
1516

1617
<application
1718
android:allowBackup="true"

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ import com.auvious.auvioussdk.ui.simpleconference.AuviousSdkSimpleConferenceErro
2323
import com.auvious.auvioussdk.ui.simpleconference.AuviousSimpleConferenceActivity
2424
import com.auvious.auvioussdk.ui.simpleconference.AuviousSimpleConferenceOptions
2525
import com.auvious.auvioussdk.utils.helpers.parcelable
26-
import com.microsoft.appcenter.AppCenter
27-
import com.microsoft.appcenter.analytics.Analytics
28-
import com.microsoft.appcenter.crashes.Crashes
2926
import kotlin.random.Random
3027

3128
/**
@@ -56,11 +53,6 @@ class MainActivity : AppCompatActivity() {
5653
setContentView(binding.root)
5754
setupWindowInsets()
5855
setupViews()
59-
// app-center
60-
AppCenter.start(
61-
application, "f1c0fdfc-612a-40c1-ab66-8cb5a8cfd722",
62-
Analytics::class.java, Crashes::class.java
63-
)
6456
}
6557

6658
private fun setupViews() {
@@ -103,7 +95,10 @@ class MainActivity : AppCompatActivity() {
10395
availableMicButton: Boolean = true,
10496
availableCamButton: Boolean = true,
10597
availableSpeakerButton: Boolean = true,
106-
customConferenceBackgroundColor: Boolean = false
98+
customConferenceBackgroundColor: Boolean = false,
99+
enablePipMenu: Boolean = true,
100+
enableScreenShare: Boolean = true,
101+
autoEnterPipOnHome: Boolean = true
107102
) {
108103

109104
val callOptions = AuviousSimpleConferenceOptions(
@@ -119,7 +114,12 @@ class MainActivity : AppCompatActivity() {
119114
AuviousSimpleConferenceOptions.cameraAvailable to availableCamButton.toString(),
120115
AuviousSimpleConferenceOptions.microphoneAvailable to availableMicButton.toString(),
121116
AuviousSimpleConferenceOptions.speakerAvailable to availableSpeakerButton.toString(),
122-
AuviousSimpleConferenceOptions.conferenceBackgroundColor to if (customConferenceBackgroundColor) Color.parseColor("#3366ff").toString() else Color.BLACK.toString()
117+
AuviousSimpleConferenceOptions.conferenceBackgroundColor to if (customConferenceBackgroundColor) Color.parseColor("#3366ff").toString() else Color.BLACK.toString(),
118+
// Picture-in-Picture options (Android 8.0+)
119+
AuviousSimpleConferenceOptions.pipAvailability to enablePipMenu.toString(),
120+
AuviousSimpleConferenceOptions.autoEnterPip to autoEnterPipOnHome.toString(),
121+
// Screen sharing (Android 5.0+)
122+
AuviousSimpleConferenceOptions.screenShareAvailability to enableScreenShare.toString()
123123
)
124124
)
125125
activityForResult.launch(AuviousSimpleConferenceActivity.getIntent(this, callOptions))

0 commit comments

Comments
 (0)