Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #307 from timkim/master
Browse files Browse the repository at this point in the history
Fix for iOS reverse camera button crash and Android plugin install
  • Loading branch information
macdonst authored Sep 5, 2016
2 parents 2af6324 + 5e58c0a commit d775cc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<!-- Not required to allow users to work around this -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
</config-file>

<framework src="src/android/barcodescanner.gradle" custom="true" type="gradleReference"/>
Expand Down
9 changes: 5 additions & 4 deletions src/ios/CDVBarcodeScanner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,12 @@ - (void)barcodeScanCancelled {
- (void)flipCamera {
self.isFlipped = YES;
self.isFrontCamera = !self.isFrontCamera;
[self barcodeScanDone];
if (self.isFlipped) {
self.isFlipped = NO;
}
[self barcodeScanDone:^{
if (self.isFlipped) {
self.isFlipped = NO;
}
[self performSelector:@selector(scanBarcode) withObject:nil afterDelay:0.1];
}];
}

//--------------------------------------------------------------------------
Expand Down

0 comments on commit d775cc7

Please sign in to comment.