Johan Schoeman Expert Licensed User Longtime User Jul 16, 2016 #1 I have this code in a wrapper but the PreviewCallback does not get fired: B4X: PreviewCallback mPreviewCallback = new PreviewCallback() { @Override public void onPreviewFrame(byte[] data, Camera camera) { BA.Log("In onPreviewFrame"); processImage(data); } }; I do have import android.hardware.Camera.PreviewCallback; in the wrapper. No compiling error - it just won't fire. Some pointers will be much appreciated.
I have this code in a wrapper but the PreviewCallback does not get fired: B4X: PreviewCallback mPreviewCallback = new PreviewCallback() { @Override public void onPreviewFrame(byte[] data, Camera camera) { BA.Log("In onPreviewFrame"); processImage(data); } }; I do have import android.hardware.Camera.PreviewCallback; in the wrapper. No compiling error - it just won't fire. Some pointers will be much appreciated.
DonManfred Expert Licensed User Longtime User Jul 16, 2016 #2 and you added the mPreviewCallback to the wrapped object in some way? B4X: myobject.addpreviewcallback(mPreviewCallback); ?
and you added the mPreviewCallback to the wrapped object in some way? B4X: myobject.addpreviewcallback(mPreviewCallback); ?
Johan Schoeman Expert Licensed User Longtime User Jul 16, 2016 #3 DonManfred said: and you added the mPreviewCallback to the wrapped object in some way? B4X: myobject.addpreviewcallback(mPreviewCallback); ? Click to expand... The callback should come from android.harware.Camera...? I imported Andoid.hardware.Camera.PreviewCallback. Should that not then raise the callback?
DonManfred said: and you added the mPreviewCallback to the wrapped object in some way? B4X: myobject.addpreviewcallback(mPreviewCallback); ? Click to expand... The callback should come from android.harware.Camera...? I imported Andoid.hardware.Camera.PreviewCallback. Should that not then raise the callback?
Johan Schoeman Expert Licensed User Longtime User Jul 16, 2016 #4 I do have.... mCamera.setPreviewCallback(mPreviewCallback); ...in the wrapper in some places where it is required but it does not fire... Last edited: Jul 16, 2016
I do have.... mCamera.setPreviewCallback(mPreviewCallback); ...in the wrapper in some places where it is required but it does not fire...