Pro camera: The pro custom camera

Do you mean that the original TakePicture and TakePreviewPicture do not have maxImgLength ?

I didn't change it because you wanted to resize the base64...:wink:

I may consider adding it at some point.

1 Like

I mean you have two version of:
the old one:
ProCamBase64
and the updated one:
procambase64,
the second one can't update the old one.
thanks.

Yes, I answered that above...

1 Like

Hi there, I have a question. Is this Camera extension using Camera1 Api or Camera2 Api.

It uses api2
From the sources

import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.TotalCaptureResult

Taifun

So it can't use CameraX because it only works for Android Studio Jetpack Compose?

What are you talking about?
You can use any extension for your App Inventor project, also this one

Taifun

No, I don't mean by that. I was asking when AI2 builds your app and converts it into an .apk. APKs should be Kotlin or Java. So AI2 converts your visual blocks into Java or Kotlin files and packages them into an APK?

no, see this answer from @ewpatton

Taifun

Thanks

How do you get file path of ProCamera's take picture method?

hi all.
I am using ProCamera extension that has TakePicture method:

  1. does TakePicture method save the photo to file? what is the file path?
  2. if TakePicture does not save photo, how to save it manually?
    Thanks.

You set the path yourself, with this block:

image

1 Like

Thanks.
does ProCamera1.Output save photo as file or base64 strings?
called takePicture and set output:

ttr2

then call ProCamera1.SavedPhoto:
set image1.picture to join: call getASD + temp.jpg ; nothing shown.
basically, nothing doing under ProCamera1.SavedPhoto, seems not called.

Hi all.
I am using ProCameraBase64, it has: TakePreviewPicture, how to save this TakePreviewPicture into ASD as /tempxz.jpg?

nmnm

I used ProCameraBase641.Output, but can't search out the tempxz, can't use it like copy file got:

photo_5181509960088006255_x

Thanks.

You are saving to ASD, then trying to copy it from your Assets, it is not there!

1 Like

do we have an AfterTakePreviewPicture (or like so) event in this extension?

There is a Saved photo event, but it doesn't return anything.

Thanks.
Is that mean it saved to getASD +..., why I can't search out with the name of tempxz?

This block will return a list of all the files in your ASD files directory. You can then search that list for your file.

image

Adjust the directory name accordingly if you want to return the files in another directory in your ASD.

If you are meaning to save your image to the files directory of the ASD, then this is the path:

image

1 Like

4 posts were split to a new topic: Upload Image File to Server