We are happy to announce that we have just released an update for the following plugins!
To upgrade:
cordova plugin remove cordova-plugin-camera
cordova plugin add cordova-plugin-camera@7.0.0
cordova plugin remove cordova-plugin-media
cordova plugin add cordova-plugin-media@7.0.0
cordova plugin remove cordova-plugin-file-transfer
cordova plugin add cordova-plugin-file-transfer@2.0.0
Release Highlights
cordova-plugin-camera
-
Android 13 Support
In this release of the
camera
plugin, themaxSdkTarget
for theWRITE_EXTERNAL_STORAGE
permission has been set to32
. This change was made as the permission has been deprecated and replaced by Android 13's more granular permissions,READ_MEDIA_IMAGES
andREAD_MEDIA_VIDEO
. Additionally, thegetPermissions
method has been improved to accurately fetch the required permissions based on the Android version. If Android 13 and above, it will also fetch based on media type.Furthermore, to support the new granular permissions on Android 13 (SDK 33), we have raised the minimum requirement for
cordova-android
to version12.0.0
. This version of Cordova-Android specifically includes the necessary updates to handle Android 13 and compile your project with the new permissions successfully. -
Removed Deprecated Platforms
As the Cordova-Windows and Cordova-OSX platform has been deprecated, the supporting logic for these platforms has been removed from this plugin.
-
Retain Image Exif Data from Photo Library (iOS)
This release contains a fix to preserve image's EXIF data for iOS.
cordova-plugin-media
-
Android 13 Support
In this release of the
media
plugin, the dependency of the file plugin has been bumped to8.0.0
which introduced Android 13 support. This support includes the Android 13's more granular permissionsREAD_MEDIA_IMAGES
,READ_MEDIA_VIDEO
, andREAD_MEDIA_AUDIO
.Additionally we have raised the minimum requirement for
cordova-android
to version12.0.0
.For more information, check out the Cordova's File Plugin 8.0.0 release blog post.
-
Removed Deprecated Windows Platforms
As the Cordova-Windows platform has been deprecated, the supporting logic for that platform has been removed from this plugin.
-
Ability to load files from custom scheme and leading slash directory paths
The file plugin can now accept URL constructed with a custom scheme or a leading slash.
Custom Scheme Example:
By default, iOS uses the following custom scheme
app://localhost/
. You can now pass inapp://localhost/file.mp4
to prepresent a media file located in the root directory of which the app content is loaded from,www
.Leading Slash Example:
It can also load the same file
file.mp4
from the above example if the provided URL was/file.mp4
. It will navigate from the root directory of which the app content is loaded from,www
. -
Increased Android's Audio Quality
From this plugin's version and onward, the Android's captured audio quality has been increased significantly. This was achieved by increasing the bit rate to 96 Kbps and the sampling rate to 44.1 kHz.
PR's Note: This plugin uses the AAC encoder, which generally provides better quality audio at a lower bitrate compared against MP3 encoder. While researching acceptable bitrate of AAC compared against MP3, some suggest using 96 Kbps for AAC while MP3 would be 128 Kbps. But this does not mean it is identical. In terms of quality, it will always depend on the source and underlying equipment.
cordova-plugin-file-transfer
-
Bumped File Dependecy for Android 13 Support
In this release of the
file-transfer
plugin, the dependency on the file plugin has been updated to version8.0.0
, enabling Android 13 support. Consequently, the minimum requirement forcordova-android
has been raised to version12.0.0
to align with the updated file plugin.For more information, check out the Cordova's File Plugin 8.0.0 release blog post.
-
Removed Deprecated Platforms
As the Cordova Windows/WP8, OSX, Amazon Fire OS, Blackberry 10, Windows Phone & Firefox OS platform has been deprecated, the supporting logic for these platforms has been removed from this plugin.
-
Removed Deprecated
whitelist
PluginThe legacy
whitelist
plugin has been deprecated for a long time and is no longer needed in thefile-transfer
plugin. This plugin will continue call and check against theshouldAllowRequest
method which is apart of the platform core coding.Refer to the Allow List page of the Cordova Documentation for more information in how to configure the list.
-
Fixed Download Functionality for Android Q+
-
Removed Hardcoded
X-Requested-With
HeaderThis hardcoded header was removed from the Android platform. This header was also not set in any other platform. It is up to the app developer to set the header if it is desired to 'disguise' the HTTP call as an XMLHttpRequest.
-
Fixed Missing Headers on File Upload
In iOS, header data was not properly being set during file upload. In this release, the
applyRequestHeaders
method was updated to ensure that the headers were being applied. -
Re-implemented UserAgent Overwrites
In iOS, the ability to overwrite the UserAgent using the
navigator.userAgent
value from the WebView was re-implemented.
Please report any issues you find at issues.cordova.io!
Changes include:
cordova-plugin-camera
Breaking Changes:
Fixes:
- GH-827 fix(android): set
applicationId
- GH-810 fix(browser): use
navigator.mediaDevices.getUserMedia
- GH-712 fix(ios): preserving
EXIF
data - GH-780 fix(android): update queries in
plugin.xml
Chores, Dependencies, Docs:
- GH-850 chore: remove windows/osx from
plugin.xml
- GH-849 chore: Update
SUPPORT_QUESTION.md
template - GH-831 chore(android): Cleanup obsolete
BuildConfig
comments - GH-846 dep(dev)!: bump
@cordova/eslint-config@5.0
- GH-800 dep(npm): bump package-lock v2 w/ rebuild
- GH-808 docs(README): Document
ANDROIDX_CORE_VERSION
variable
CI:
- GH-851 ci(gh-action): sync with
paramedic
configs - GH-835 ci(android): Drop API 22 & 31. Added API 24 & 33
- GH-804 ci: sync workflow with
paramedic
- GH-798 ci(android): update java requirement for
cordova-android@11
- GH-770 ci(ios): update workflow w/ iOS 15
- GH-766 ci: remove old ci workflow
- GH-765 ci: add action-badge
- GH-764 ci: remove
travis
&appveyor
- GH-762 ci: add
gh-actions
workflows
cordova-plugin-media
Breaking Changes:
- GH-384 fix!: remove deprecated
windows
platform - GH-378 feat(android)!: bump file & Android requirements
Features:
- GH-362 feat(ios): load media files with custom scheme+hostname and leading directory paths
- GH-383 feat(android): increase audio encoding bitrate and sampling rate
- GH-382 feat(android): support Android 13 permission checks and requests
Others:
- GH-381 dep(dev)!: bump
@cordova/eslint-config@5.0.0
- GH-377 ci: sync github action workflow w/ paramedic base configs
cordova-plugin-file-transfer
Breaking Changes:
- GH-360 feat(android)!: bump
cordova-plugin-file@8.0.0
&cordova-android >= 12.0.0
- GH-346 feat(windows)!: remove deprecated platform Windows
- GH-307 feat!: remove deprecated
whitelist
usage - GH-270 feat!: remove deprecated platforms (Amazon Fire OS, BlackBerry, Windows Phone, Firefox OS, Windows 8)
- GH-370 dep(server)!: bump
forever@4.0.3
,iconv@3.0.1
,busboy@1.6.0
& rebuiltpackage-lock
Fixes:
- GH-372 fix(tests): Use
https
on file urls - GH-371 fix(tests): change default server port
- GH-361 fix: test version
- GH-310 fix(android): enable download functionality with Android Q
- GH-313 fix: incorrect asset file paths in test
- GH-287 fix(ios): remove hardcoded
X-Requested-With
header - GH-284 fix(ios): headers are not being sent
- GH-268 fix(ios): re-implement user agent overwrite
- GH-199 fix(windows): js error "The parameter is incorrect"
Chores:
- GH-373 chore: add missing license header
- GH-368 chore: remove windows leftovers
- GH-335 chore: remove use-permission
WRITE_EXTERNAL_STORAGE
- GH-324 chore:
package-lock
upgrade - GH-323 chore: .npmrc
- GH-299 chore: bump 'protective' entry for major release 2.0 to come
- GH-274 chore: adds
package-lock
file - GH-272 chore: package cleanup
- GH-269 chore(npm): adds ignore list
Dependencies, CI, and Doc:
- GH-369 dep: bump
@cordova/eslint-config@5.0.0
& rebuiltpackage-lock
- GH-344 dep(npm): bump
package-lock
v2 & rebuilt - GH-341 dep(server): bump
i
from0.3.6
to0.3.7
- GH-329 dep: bump
minimist
from1.2.5
to1.2.6
- GH-362 ci: sync github action workflow w/ paramedic base configs
- GH-348 ci: sync workflow with paramedic
- GH-343 ci(android): update java requirement for
cordova-android@11
- GH-318 ci(ios): update workflow w/ iOS 15
- GH-315 ci: add action-badge
- GH-314 ci: remove
travis
&appveyor
- GH-311 ci: add
gh-actions
workflows - GH-280 doc: Improve
progressEvent
documentation - GH-267 doc: undeprecate the plugin
- GH-211 doc: remove outdated translations