CameraX API Implementation in Sketchware

CameraX API Implementation in Sketchware

In this post, I will discuss how to implement the CameraX API in the Sketchware project.

implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"

Create a Sketchware project and add a LinearLayout and ImageView. Convert LinearLayout to TextureView.

Next, we will continue implementing the Block in OnCreate, please download the block I created at the link below:

Custom Block CameraX Implementation

Place the Block in the CameraX implementation on OnCreate as shown in the example image below:

Next, add the library that I created by downloading it at the link below:

androidx.concurrent Library Download

androidx.camera2 Library Download

androidx.camera.core Library Download

ExifInterface Library Download

ListEnableFuture Library Download

The final step is to add the code below to your android application manifest. Good luck and smooth, good luck.

<provider
    android:name="androidx.camera.camera2.impl.Camera2Initializer"
    android:authorities="${applicationId}.camerax-init"
    android:exported="false"
    android:initOrder="100"
    android:multiprocess="true" />

Download Sample Project : Sample Sketchware Project CameraX Download

Anda mungkin juga suka...

Artikel Populer

Enable Notifications    Ok No thanks