apache / apache/cordova-plugin-media

Anomalous Permission Usage (for RECORD_AUDIO permission)

Open
#397 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
391
Forks
762
PR merge metrics
No merged PRs in 30d

Description

# Feature Request

Since I don't use this plugin to record audio, but only to play music / sounds (as probably many other developers do too), it would be nice if there was a way to **NOT** include the **RECORD_AUDIO** permission (both for Android and iOS). Also, for some categories of apps, Google apparently doesn't like this RECORD_AUDIO permission.

## Motivation Behind Feature

Useful if you don't need to use the record feature. Also resolves this problem with Google:

![anomalous-permission-usage](https://github.com/apache/cordova-plugin-media/assets/35746502/cb908afc-6656-4ee3-8ca3-557752fb1a94)

## Feature Description

I don't know how exactly it could be done without a fork, but maybe just add a variable to NOT include the RECORD_AUDIO permission? Like **--NO-RECORD_AUDIO**. Actually, there is also the **MODIFY_AUDIO_SETTINGS** permission, I think it could be removed too if you only want to play music (I'm not 100% sure though)

## Alternatives or Workarounds

If anyone have any idea on how to remove this permission (or maybe there is already a feature like this and I haven't founded it), let me know 😄

In the meantime, I have created a fork that I will keep synced with the main plugin, but without the extra permissions: https://github.com/TheNotorius0/cordova-plugin-media

Contributor guide

Open the contributing guide

Research direction

Start by locating where the Cordova plugin declares Android and iOS permissions, then trace how plugin configuration is passed during installation. Define an option that excludes RECORD_AUDIO, and determine whether MODIFY_AUDIO_SETTINGS should also be optional; done means playback still works while recording remains available when the permissions are enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, javascript
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.