Skip to content

Commit

Permalink
fix!: remove deprecated platforms (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Aug 31, 2023
1 parent 8cb34e1 commit 20293f3
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 1,239 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ __Supported Platforms__
- Android
- Browser
- iOS
- Windows
- OSX

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

Expand Down Expand Up @@ -476,16 +474,6 @@ displays:
// do your thing here!
}, 0);

#### Windows quirks

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
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
start page from scratch and success and error callbacks will never be called.

To avoid this we suggest using SPA pattern or call `camera.getPicture` only from your app's start page.

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)

## `CameraOptions` Errata <a name="CameraOptions-quirks"></a>

#### Android Quirks
Expand Down Expand Up @@ -571,12 +559,6 @@ function displayImage(imgUri) {
}
```

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.

```html
<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 *">
```

## Take a Picture and Return Thumbnails (Resize the Picture) <a name="getThumbnails"></a>

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).
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"platforms": [
"android",
"ios",
"browser",
"windows",
"osx"
"browser"
]
},
"repository": "github:apache/cordova-plugin-camera",
Expand All @@ -21,9 +19,7 @@
"ecosystem:cordova",
"cordova-android",
"cordova-ios",
"cordova-browser",
"cordova-windows",
"cordova-osx"
"cordova-browser"
],
"scripts": {
"test": "npm run lint",
Expand Down
80 changes: 0 additions & 80 deletions src/osx/CDVCamera.h

This file was deleted.

Loading

0 comments on commit 20293f3

Please sign in to comment.