Skip to content

Commit f435c97

Browse files
committed
Update permissions
Add comment on the `AndroidManifest.xml` to let devs know which permissions need to de added to their app to support audio conversation. Since the SDK does not add the permission, a lint file is also added that silences the warning about missing permissions.
1 parent 6c88b19 commit f435c97

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

firebase-vertexai/firebase-vertexai.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ android {
6363
isReturnDefaultValues = true
6464
}
6565
}
66-
lint { targetSdk = targetSdkVersion }
66+
lint {
67+
targetSdk = targetSdkVersion
68+
baseline = file("lint-baseline.xml")
69+
}
6770
}
6871

6972
// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="6" by="lint 8.3.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.2)" variant="all" version="8.3.2">
3+
4+
<issue
5+
id="MissingPermission"
6+
message="Missing permissions required by AudioRecord.AudioRecord: android.permission.RECORD_AUDIO"
7+
errorLine1=" AudioRecord("
8+
errorLine2=" ^">
9+
<location
10+
file="src/main/kotlin/com/google/firebase/vertexai/type/AudioHelper.kt"
11+
line="85"
12+
column="7"/>
13+
</issue>
14+
15+
<issue
16+
id="UnsafeOptInUsageWarning"
17+
message="This declaration is opt-in and its usage should be marked with `@kotlinx.serialization.ExperimentalSerializationApi` or `@OptIn(markerClass = kotlinx.serialization.ExperimentalSerializationApi.class)`">
18+
<location
19+
file="src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt"/>
20+
</issue>
21+
22+
</issues>

firebase-vertexai/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
2121
<uses-permission android:name="android.permission.INTERNET" />
2222

23+
<!-- To use the audio conversation feature of Live Sessions, update your app's manifest -->
24+
<!-- to request audio recording permission -->
25+
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
2326

2427
<application>
2528
<service android:name="com.google.firebase.components.ComponentDiscoveryService"

0 commit comments

Comments
 (0)