Skip to content

Commit b567317

Browse files
davidofwatkinsAbrissirbacodeconsoleerisujcesarmobile
authored
[ZP-13183] Merge Upstream (#5)
* fix(android): update queries in plugin.xml (apache#780) Solves the issue with duplicate queries elements in AppManifest.xml apache#779 * fix(ios): preserving EXIF data (apache#712) * ci(android): update java requirement for cordova-android@11 (apache#798) * dep(npm): bump package-lock v2 w/ rebuild (apache#800) * docs(README): Document ANDROIDX_CORE_VERSION variable (apache#808) * fix(browser): use navigator.mediaDevices.getUserMedia (apache#810) * ci: sync workflow with paramedic (apache#804) * fix(android): set applicationId (apache#827) Co-authored-by: Alexandre Alves <[email protected]> * chore(android): Cleanup obsolete BuildConfig comments (apache#831) * ci(android): Drop API 22 & 31. Added API 24 & 33 (apache#835) Co-authored-by: エリス <[email protected]> * chore: bump plugin version 7.0.0-dev (apache#845) * dep(dev)!: bump @cordova/[email protected] (apache#846) * dep(dev)!: bump @cordova/[email protected] * chore: apply automatic lint fix * feat(android)!: Android 13 support (apache#844) * feat(android)!: Android 13 support * refactor(android): simplify getPermissions logic * feat(android)!: bump cordova-android requirement to >=12.0.0 * feat(android): update saveAlbumPermission to include Android 9 and below use case --------- Co-authored-by: ochakov <[email protected]> * chore: Update SUPPORT_QUESTION.md template (apache#849) * fix!: remove deprecated platforms (apache#848) * chore: remove windows/osx from plugin.xml (apache#850) * ci(gh-action): sync with paramedic configs (apache#851) * release(camera-v7.0.0): updated version and RELEASENOTES.md * chore: bump version 7.0.1-dev --------- Co-authored-by: Marcus Abrahamsson <[email protected]> Co-authored-by: Scott Murphy <[email protected]> Co-authored-by: エリス <[email protected]> Co-authored-by: jcesarmobile <[email protected]> Co-authored-by: seamlink-aalves <[email protected]> Co-authored-by: Alexandre Alves <[email protected]> Co-authored-by: Norman Breau <[email protected]> Co-authored-by: ochakov <[email protected]> Co-authored-by: Erisu <[email protected]>
1 parent b3d35a9 commit b567317

23 files changed

+3880
-2524
lines changed

.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ For usage and support questions, please check out the resources below. Thanks!
1313

1414
You can get answers to your usage and support questions about **Apache Cordova** on:
1515

16-
* Slack Community Chat: https://cordova.slack.com (you can sign-up at http://slack.cordova.io/)
16+
* GitHub Discussions: https://github.com/apache/cordova/discussions
17+
* Slack Community Chat: https://cordova.slack.com (you can sign-up at https://s.apache.org/cordova-slack)
1718
* StackOverflow: https://stackoverflow.com/questions/tagged/cordova using the tag `cordova`
1819

1920
---
@@ -22,6 +23,4 @@ If you are using a tool that uses Cordova internally, like e.g. Ionic, check the
2223

2324
* **Ionic Framework**
2425
* [Ionic Community Forum](https://forum.ionicframework.com/)
25-
* [Ionic Worldwide Slack](https://ionicworldwide.herokuapp.com/)
26-
* **PhoneGap**
27-
* [PhoneGap Developer Community](https://forums.adobe.com/community/phonegap)
26+
* [Ionic Discord](https://ionic.link/discord)

.github/workflows/android.yml

+17-28
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
test:
3434
name: Android ${{ matrix.versions.android }} Test
3535
runs-on: macos-latest
36+
continue-on-error: true
3637

3738
# hoist configurations to top that are expected to be updated
3839
env:
@@ -43,8 +44,8 @@ jobs:
4344

4445
# These are the default Java configurations used by most tests.
4546
# To customize these options, add "java-distro" or "java-version" to the strategy matrix with its overriding value.
46-
default_java-distro: adopt
47-
default_java-version: 8
47+
default_java-distro: temurin
48+
default_java-version: 11
4849

4950
# These are the default Android System Image configurations used by most tests.
5051
# To customize these options, add "system-image-arch" or "system-image-target" to the strategy matrix with its overriding value.
@@ -55,43 +56,31 @@ jobs:
5556
strategy:
5657
matrix:
5758
versions:
58-
- android: 5.1
59-
android-api: 22
60-
61-
- android: 6
62-
android-api: 23
63-
59+
# Test the lowest minimum supported APIs
6460
- android: 7
6561
android-api: 24
6662

67-
- android: 7.1
68-
android-api: 25
69-
70-
- android: 8
71-
android-api: 26
72-
73-
- android: 8.1
74-
android-api: 27
75-
system-image-target: default
76-
77-
- android: 9
78-
android-api: 28
79-
63+
# Test the last 3-4 supported APIs
8064
- android: 10
8165
android-api: 29
8266

8367
- android: 11
8468
android-api: 30
85-
java-version: 11
69+
70+
- android: 12L
71+
android-api: 32
72+
73+
- android: 13
74+
android-api: 33
8675

8776
timeout-minutes: 60
8877

8978
steps:
90-
- uses: actions/checkout@v2
91-
- uses: actions/setup-node@v2
79+
- uses: actions/checkout@v3
80+
- uses: actions/setup-node@v3
9281
with:
9382
node-version: ${{ env.node-version }}
94-
- uses: actions/setup-java@v2
83+
- uses: actions/setup-java@v3
9584
env:
9685
java-version: ${{ matrix.versions.java-version == '' && env.default_java-version || matrix.versions.java-version }}
9786
java-distro: ${{ matrix.versions.java-distro == '' && env.default_java-distro || matrix.versions.java-distro }}
@@ -113,10 +102,10 @@ jobs:
113102
npm ci
114103
115104
- name: Run paramedic install
116-
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
105+
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
117106
run: npm i -g github:apache/cordova-paramedic
118107

119-
- uses: reactivecircus/android-emulator-runner@5de26e4bd23bf523e8a4b7f077df8bfb8e52b50e
108+
- uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
120109
env:
121110
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
122111
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}
@@ -130,7 +119,7 @@ jobs:
130119
script: echo "Pregenerate the AVD before running Paramedic"
131120

132121
- name: Run paramedic tests
133-
uses: reactivecircus/android-emulator-runner@5de26e4bd23bf523e8a4b7f077df8bfb8e52b50e
122+
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
134123
env:
135124
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
136125
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}

.github/workflows/chrome.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
node-version: 16
4343

4444
steps:
45-
- uses: actions/checkout@v2
46-
- uses: actions/setup-node@v2
45+
- uses: actions/checkout@v3
46+
- uses: actions/setup-node@v3
4747
with:
4848
node-version: ${{ env.node-version }}
4949

@@ -61,7 +61,7 @@ jobs:
6161
npm ci
6262
6363
- name: Run paramedic install
64-
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
64+
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
6565
run: npm i -g github:apache/cordova-paramedic
6666

6767
- name: Run paramedic tests

.github/workflows/ios.yml

+11-16
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
test:
3434
name: iOS ${{ matrix.versions.ios-version }} Test
3535
runs-on: ${{ matrix.versions.os-version }}
36+
continue-on-error: true
3637

3738
# hoist configurations to top that are expected to be updated
3839
env:
@@ -49,28 +50,28 @@ jobs:
4950
strategy:
5051
matrix:
5152
versions:
52-
- os-version: macos-10.15
53-
ios-version: 12.x
54-
xcode-version: 11.x
55-
56-
- os-version: macos-10.15
53+
- os-version: macos-11
5754
ios-version: 13.x
5855
xcode-version: 11.x
5956

60-
- os-version: macos-10.15
57+
- os-version: macos-11
6158
ios-version: 14.x
6259
xcode-version: 12.x
6360

6461
- os-version: macos-11
6562
ios-version: 15.x
6663
xcode-version: 13.x
6764

65+
- os-version: macos-12
66+
ios-version: 16.x
67+
xcode-version: 14.x
68+
6869
steps:
69-
- uses: actions/checkout@v2
70-
- uses: actions/setup-node@v2
70+
- uses: actions/checkout@v3
71+
- uses: actions/setup-node@v3
7172
with:
7273
node-version: ${{ env.node-version }}
73-
- uses: maxim-lobanov/setup-xcode@881be567d30efed8fb3f12b5099d68c3fb72aa3d
74+
- uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98
7475
env:
7576
xcode-version: ${{ matrix.versions.xcode-version == '' && env.default_xcode-version || matrix.versions.xcode-version }}
7677
with:
@@ -87,14 +88,8 @@ jobs:
8788
npm i -g cordova@latest ios-deploy@latest
8889
npm ci
8990
90-
- name: Run setup iOS 12.x support
91-
if: ${{ matrix.versions.ios-version == '12.x' }}
92-
run: |
93-
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
94-
sudo ln -s /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 12.4.simruntime
95-
9691
- name: Run paramedic install
97-
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
92+
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
9893
run: npm i -g github:apache/cordova-paramedic
9994

10095
- name: Run paramedic tests

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
node-version: 16
3838

3939
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions/setup-node@v2
40+
- uses: actions/checkout@v3
41+
- uses: actions/setup-node@v3
4242
with:
4343
node-version: ${{ env.node-version }}
4444

README.md

+8-22
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,20 @@ Although the object is attached to the global scoped `navigator`, it is not avai
3838

3939
## Installation
4040

41-
This requires cordova 5.0+
42-
4341
cordova plugin add cordova-plugin-camera
44-
Older versions of cordova can still install via the __deprecated__ id
4542

46-
cordova plugin add org.apache.cordova.camera
4743
It is also possible to install via repo url directly ( unstable )
4844

4945
cordova plugin add https://github.com/apache/cordova-plugin-camera.git
5046

47+
## Plugin variables
48+
49+
The plugin uses the `ANDROIDX_CORE_VERSION` variable to configure `androidx.core:core` dependency. This allows to avoid conflicts with other plugins that have the dependency hardcoded.
50+
If no value is passed, it will use `1.6.+` as the default value.
51+
52+
The variable is configured on install time
53+
54+
cordova plugin add cordova-plugin-camera --variable ANDROIDX_CORE_VERSION=1.8.0
5155

5256
## How to Contribute
5357

@@ -168,8 +172,6 @@ __Supported Platforms__
168172
- Android
169173
- Browser
170174
- iOS
171-
- Windows
172-
- OSX
173175

174176
More examples [here](#camera-getPicture-examples). Quirks [here](#camera-getPicture-quirks).
175177

@@ -472,16 +474,6 @@ displays:
472474
// do your thing here!
473475
}, 0);
474476

475-
#### Windows quirks
476-
477-
On Windows Phone 8.1 using `SAVEDPHOTOALBUM` or `PHOTOLIBRARY` as a source type causes application to suspend until file picker returns the selected image and
478-
then restore with start page as defined in app's `config.xml`. In case when `camera.getPicture` was called from different page, this will lead to reloading
479-
start page from scratch and success and error callbacks will never be called.
480-
481-
To avoid this we suggest using SPA pattern or call `camera.getPicture` only from your app's start page.
482-
483-
More information about Windows Phone 8.1 picker APIs is here: [How to continue your Windows Phone app after calling a file picker](https://msdn.microsoft.com/en-us/library/windows/apps/dn720490.aspx)
484-
485477
## `CameraOptions` Errata <a name="CameraOptions-quirks"></a>
486478

487479
#### Android Quirks
@@ -567,12 +559,6 @@ function displayImage(imgUri) {
567559
}
568560
```
569561

570-
To display the image on some platforms, you might need to include the main part of the URI in the Content-Security-Policy `<meta>` element in index.html. For example, on Windows 10, you can include `ms-appdata:` in your `<meta>` element. Here is an example.
571-
572-
```html
573-
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: ms-appdata: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
574-
```
575-
576562
## Take a Picture and Return Thumbnails (Resize the Picture) <a name="getThumbnails"></a>
577563

578564
To get smaller images, you can return a resized image by passing both `targetHeight` and `targetWidth` values with your CameraOptions object. In this example, you resize the returned image to fit in a 100px by 100px box (the aspect ratio is maintained, so 100px is either the height or width, whichever is greater in the source).

RELEASENOTES.md

+35
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,41 @@
2020
-->
2121
# Release Notes
2222

23+
### 7.0.0 (Sep 06, 2023)
24+
25+
**Breaking Changes:**
26+
27+
* [GH-848](https://github.com/apache/cordova-plugin-camera/pull/848) fix!: remove deprecated platforms
28+
* [GH-844](https://github.com/apache/cordova-plugin-camera/pull/844) feat(android)!: Android 13 support
29+
30+
**Fixes:**
31+
32+
* [GH-827](https://github.com/apache/cordova-plugin-camera/pull/827) fix(android): set `applicationId`
33+
* [GH-810](https://github.com/apache/cordova-plugin-camera/pull/810) fix(browser): use `navigator.mediaDevices.getUserMedia`
34+
* [GH-712](https://github.com/apache/cordova-plugin-camera/pull/712) fix(ios): preserving `EXIF` data
35+
* [GH-780](https://github.com/apache/cordova-plugin-camera/pull/780) fix(android): update queries in `plugin.xml`
36+
37+
**Chores, Dependencies, Docs:**
38+
39+
* [GH-850](https://github.com/apache/cordova-plugin-camera/pull/850) chore: remove windows/osx from `plugin.xml`
40+
* [GH-849](https://github.com/apache/cordova-plugin-camera/pull/849) chore: Update `SUPPORT_QUESTION.md` template
41+
* [GH-831](https://github.com/apache/cordova-plugin-camera/pull/831) chore(android): Cleanup obsolete `BuildConfig` comments
42+
* [GH-846](https://github.com/apache/cordova-plugin-camera/pull/846) dep(dev)!: bump `@cordova/[email protected]`
43+
* [GH-800](https://github.com/apache/cordova-plugin-camera/pull/800) dep(npm): bump package-lock v2 w/ rebuild
44+
* [GH-808](https://github.com/apache/cordova-plugin-camera/pull/808) docs(README): Document `ANDROIDX_CORE_VERSION` variable
45+
46+
**CI:**
47+
48+
* [GH-851](https://github.com/apache/cordova-plugin-camera/pull/851) ci(gh-action): sync with `paramedic` configs
49+
* [GH-835](https://github.com/apache/cordova-plugin-camera/pull/835) ci(android): Drop API 22 & 31. Added API 24 & 33
50+
* [GH-804](https://github.com/apache/cordova-plugin-camera/pull/804) ci: sync workflow with `paramedic`
51+
* [GH-798](https://github.com/apache/cordova-plugin-camera/pull/798) ci(android): update java requirement for `cordova-android@11`
52+
* [GH-770](https://github.com/apache/cordova-plugin-camera/pull/770) ci(ios): update workflow w/ iOS 15
53+
* [GH-766](https://github.com/apache/cordova-plugin-camera/pull/766) ci: remove old ci workflow
54+
* [GH-765](https://github.com/apache/cordova-plugin-camera/pull/765) ci: add action-badge
55+
* [GH-764](https://github.com/apache/cordova-plugin-camera/pull/764) ci: remove `travis` & `appveyor`
56+
* [GH-762](https://github.com/apache/cordova-plugin-camera/pull/762) ci: add `gh-actions` workflows
57+
2358
### 6.0.0 (Aug 19, 2021)
2459

2560
**Feature:**

0 commit comments

Comments
 (0)