Skip to content

Commit e2f5d14

Browse files
author
Dimitar Tachev
authored
Merge pull request #67 from NativeScript/tachev/rebase-cancel-pr
Rebased PR #65 fixing its lint error
2 parents 7c08d27 + 0cf23f1 commit e2f5d14

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ camera.requestPermissions();
5555
| 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). |
5656
| keepAspectRatio | true | Defines if camera picture aspect ratio should be kept during picture resizing. This property could affect width or height return values. |
5757
| saveToGallery | false | Defines if camera picture should be copied to photo Gallery (Android) or Photos (iOS) |
58-
| cameraFacing | rear | The initial camera facing. |
58+
| cameraFacing | rear | The initial camera facing. Use 'front' for selfies. |
5959

6060
## Usage
6161

src/camera.android.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export let takePicture = function (options?): Promise<any> {
8282

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

85+
// Remove previous listeners if any
86+
appModule.android.off("activityResult");
87+
8588
appModule.android.on("activityResult", (args) => {
8689
const requestCode = args.requestCode;
8790
const resultCode = args.resultCode;

0 commit comments

Comments
 (0)