File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
camerademoapp/src/main/java/com/nativescript/camerademoapp Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
3- subprojects {ext. cameraxVersion = " 1.4.0-alpha02" }
3+ // subprojects {ext.cameraxVersion = "1.4.0-alpha02"}
44
55buildscript {
66 ext. kotlin_version = ' 1.8.0'
Original file line number Diff line number Diff line change 11package com.nativescript.camerademoapp
22
33import android.content.pm.PackageManager
4+ import android.graphics.Bitmap
45import android.graphics.Color
56import android.media.Image
67import android.os.Bundle
@@ -96,6 +97,7 @@ class FirstFragment : Fragment() {
9697
9798 override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
9899 super .onViewCreated(view, savedInstanceState)
100+ binding.cameraView.savePhotoToDisk = false
99101 binding.cameraView.listener = object : CameraEventListener {
100102 override fun onReady () {
101103 Log .d(" CameraView" ," onReady" )
@@ -114,12 +116,10 @@ class FirstFragment : Fragment() {
114116 }
115117
116118 override fun onCameraPhotoImage (
117- image : Image ? ,
119+ image : Bitmap ? ,
118120 info : androidx.camera.core.ImageInfo ,
119- processor : ImageAsyncProcessor
120121 ) {
121122 Log .d(" CameraView" ," onCameraPhotoImage: " + ((System .nanoTime()- photoTime)/ 1000000 ) + " ms" )
122- processor.finished()
123123 }
124124
125125 override fun onCameraVideo (file : File ? ) {
You can’t perform that action at this time.
0 commit comments