Skip to content

Commit 5dedb08

Browse files
maciejmakowski2003maciejmakowski2003
andauthored
Fix/react module info ctor (#635)
* fix: fixed ReactModuleInfo ctor * docs: added info about new foreground service permissions and capabilities * ci: yarn lint * chore: added comments to react info module ctor arguments --------- Co-authored-by: maciejmakowski2003 <[email protected]>
1 parent 5d5b3d1 commit 5dedb08

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

packages/audiodocs/docs/other/audio-api-plugin.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ Allows to specify certain android app permissions to apply.
114114

115115
- `android.permission.FOREGROUND_SERVICE` - Allows an app to run a Foreground Service
116116

117-
- `android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK` - Allows an app to run a Foreground Service specifically for playing audio or video.
117+
- `android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK` - Allows an app to run a Foreground Service specifically for continues audio or video playback.
118+
119+
- `android.permission.FOREGROUND_SERVICE_MICROPHONE` - Allows an app to run a Foreground Service specifically for continues microphone capture from the background.
118120

119121
- `android.permission.MODIFY_AUDIO_SETTINGS` - Allows an app to modify global audio settings.
120122

@@ -136,3 +138,8 @@ Allows user to specify appropriate Foreground Service type.
136138
##### Types description
137139

138140
- `mediaPlayback` - Continue audio or video playback from the background.
141+
142+
- `microphone` - Continue microphone capture from the background, such as voice recorders or communication apps.
143+
144+
Runtime prerequisites:
145+
- Request and be granted the RECORD_AUDIO runtime permission.

packages/react-native-audio-api/android/src/main/java/com/swmansion/audioapi/AudioAPIPackage.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class AudioAPIPackage : BaseReactPackage() {
3131
ReactModuleInfo(
3232
AudioAPIModule.NAME,
3333
AudioAPIModule.NAME,
34-
canOverrideExistingModule = true,
35-
needsEagerInit = false,
36-
isCxxModule = false,
37-
isTurboModule = isTurboModule,
34+
true, // canOverrideExistingModule
35+
false, // needsEagerInit
36+
false, // isCxxModule
37+
isTurboModule,
3838
)
3939

4040
moduleInfos

0 commit comments

Comments
 (0)