Skip to content

Commit e3e3741

Browse files
author
farfromrefug
committed
fix(android): some fixes
1 parent f712fab commit e3e3741

File tree

1 file changed

+10
-1
lines changed
  • packages/ui-cameraview/platforms/android/java/com/nativescript/cameraview

1 file changed

+10
-1
lines changed

packages/ui-cameraview/platforms/android/java/com/nativescript/cameraview/CameraView.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,9 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
11711171
}
11721172
}
11731173

1174+
override fun onCaptureStarted(){
1175+
1176+
}
11741177
override fun onError(exception: ImageCaptureException) {
11751178
listener?.onCameraError("Failed to take photo image", exception)
11761179
}
@@ -1196,6 +1199,9 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
11961199
) // outputFileResults.savedUri.toString() is null
11971200
}
11981201

1202+
override fun onCaptureStarted(){
1203+
1204+
}
11991205
override fun onError(exception: ImageCaptureException) {
12001206
listener?.onCameraError("Failed to take photo image", exception)
12011207
}
@@ -1470,7 +1476,10 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
14701476
streamMap.getOutputSizes(ImageFormat.JPEG) +
14711477
streamMap.getOutputSizes(SurfaceTexture::class.java)
14721478
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
1473-
sizes += streamMap.getHighResolutionOutputSizes(ImageFormat.JPEG)
1479+
val highRes = streamMap.getHighResolutionOutputSizes(ImageFormat.JPEG)
1480+
if(highRes!=null) {
1481+
sizes += highRes
1482+
}
14741483
}
14751484
for (size in sizes) {
14761485
val aspect = size.width.toFloat() / size.height.toFloat()

0 commit comments

Comments
 (0)