Skip to content

Rebased PR #65 fixing its lint error #67

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

Merged
merged 3 commits into from
Nov 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ camera.requestPermissions();
| height | 0 | Defines the desired height (in device independent pixels) of the taken image. It should be used with width property. If `keepAspectRatio` actual image width could be different in order to keep the aspect ratio of the original camera image. The actual image height will be greater than requested if the display density of the device is higher (than 1) (full HD+ resolutions). |
| keepAspectRatio | true | Defines if camera picture aspect ratio should be kept during picture resizing. This property could affect width or height return values. |
| saveToGallery | false | Defines if camera picture should be copied to photo Gallery (Android) or Photos (iOS) |
| cameraFacing | rear | The initial camera facing. |
| cameraFacing | rear | The initial camera facing. Use 'front' for selfies. |

## Usage

Expand Down
3 changes: 3 additions & 0 deletions src/camera.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export let takePicture = function (options?): Promise<any> {

let appModule: typeof applicationModule = require("tns-core-modules/application");

// Remove previous listeners if any
appModule.android.off("activityResult");

appModule.android.on("activityResult", (args) => {
const requestCode = args.requestCode;
const resultCode = args.resultCode;
Expand Down