Closed KryptKode closed 2 years ago
again, Im not testing functionality yet, just checking code style. You are often squeezing it too much though, doing many things at once on 1 line. It is unreadable though and if it crashes somewhere, I wont know which part crashed it. Short code doesnt mean good code, just make it more readable by creating local variables, moving brackets on new lines etc.
are you fixing the issues, or just at the final refactoring?
are you fixing the issues, or just at the final refactoring?
Will push the fixes for this, then raise other PRs for the remaining stuffs
ok, guess this is good enough to be accepted
Notes
to handle the media storage location and image/video capture intents according to the developer guides for image/video
MediaOutputHelper
OutputStream
for photosFileDescriptor
for videos (currently requires API 26+). The API might changeBitmap
as adata
extra and also the URI as the Intent dataUri
as the Intent datato test the image/video capture intents, you can download this APK created from this repository (tried to use ADB but it didn't work well)
handle torch state in video capture
handle some camera errors (documented here)
add
CameraXInitializer
to abstractCameraXPreview
initialisation logic