Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): support Android 13 permission checks and requests #382

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

erisu
Copy link
Member

@erisu erisu commented Aug 22, 2023

Platforms affected

android

Motivation and Context

Check for and request for permissions based on Android versions.

All Android versions will check for RECORD_AUDIO permission. If the permission is not missing (not granted), it will request for permission.

If Android SDK is less then 33, also check for WRITE_EXTERNAL_STORAGE. Request for the permission if missing.

Closes #380
Closes #374
Resolves #373

Description

  • refactored the promptForRecord method
  • removed excessive methods.

Testing

  • Created Cordova default project
  • Added plugin.
  • Tested recording functionality.
  • Tested playing the file that was created from the tested recording.
  • Confirmed that the temporary audio file name tmprecording-<KEY>.3gp was renamed to the specified filename.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@erisu erisu added this to the 7.0.0 milestone Aug 22, 2023
@erisu erisu requested a review from breautek August 22, 2023 02:29
@erisu erisu merged commit 0938ec0 into apache:master Aug 22, 2023
5 of 10 checks passed
@erisu erisu deleted the feat/android-13-support branch August 22, 2023 14:36
kntrs pushed a commit to dejiren/cordova-plugin-media-m4a that referenced this pull request Sep 25, 2023
schlingel pushed a commit to schlingel/cordova-plugin-media that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants