mirror of
https://github.com/status-im/react-native-camera.git
synced 2025-02-24 09:48:17 +00:00
Bug/save to capture when app goes on pause (#1578)
* add scan support for landscape mode * refactoring * fix errors * fix rotation * add landscape orientation support * fix exception * freeze preview image From PR https://github.com/lwansbrough/react-native-camera/pull/919 * fix bug on android when user take photo and press home button immediately - after that camera not works
This commit is contained in:
parent
f3a973bc31
commit
60b9ef1b84
@ -818,7 +818,7 @@ public class RCTCameraModule extends ReactContextBaseJavaModule
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onHostResume() {
|
public void onHostResume() {
|
||||||
// ... do nothing
|
mSafeToCapture = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -397,7 +397,7 @@ class RCTCameraViewFinder extends TextureView implements TextureView.SurfaceText
|
|||||||
resultPoints.pushMap(newPoint);
|
resultPoints.pushMap(newPoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
event.putArray("bounds", resultPoints);
|
event.putArray("bounds", resultPoints);
|
||||||
event.putString("data", result.getText());
|
event.putString("data", result.getText());
|
||||||
event.putString("type", result.getBarcodeFormat().toString());
|
event.putString("type", result.getBarcodeFormat().toString());
|
||||||
@ -528,4 +528,4 @@ class RCTCameraViewFinder extends TextureView implements TextureView.SurfaceText
|
|||||||
float y = event.getY(0) - event.getY(1);
|
float y = event.getY(0) - event.getY(1);
|
||||||
return (float) Math.sqrt(x * x + y * y);
|
return (float) Math.sqrt(x * x + y * y);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user