I have now added the camera preview! This proved to be much harder to do than it originally seemed. In order to show the preview, I had to switch to using CameraX API instead of using Camera2. This was because I constantly ran into glitches where the preview was stretched, or rotating the preview would cause problems. I have also made the orientation always portrait when in the camera preview. This helps the fluidity of the UI as you will not see the screen tilting animation when turning the phone (usually, camera software only tilts the icons or buttons). At the moment, the preview only shows the camera feed. I also used AI to help me with the logic for the camera preview and changing my project from Camera2 to CameraX.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.