Closed EyrisCrafts closed 5 years ago
Is this where the crash is occuring?
Yes
Please send me a link containing a gist of your Camera2Fragment.java class.
You can create a gist here: https://gist.github.com
I'm not sure if this is how to create a gist. Hopefully this is what you are asking for.
https://gist.github.com/K-Rafiki/4cdead426b2ff179c734ec96000c206e
Yep just remove the .js and it's good. I'll take a look tomorrow it's 11:30pm now.
Looks like the Camera2 API does not work on your phone. From what I've read online it looks like you need to root the phone and make some alterations. https://xiaomifirmware.com/guides-and-tips/google-hdr-camera-slo-mo-redmi-4x/
NOTE: I have changed nothing to the code. It is as is from the github. Here is The PhoneTest Result.
----------- Device Information -----------
----------- Display Properties -----------
Here is the Error itself..
2018-12-04 15:07:56.490 22394-22600/codingwithmitch.com.tabiancustomcamera E/GlideExecutor: Request threw uncaught throwable com.bumptech.glide.Registry$NoModelLoaderAvailableException: Failed to find any ModelLoaders for model: android.media.ImageReader$SurfaceImage@742293a at com.bumptech.glide.Registry.getModelLoaders(Registry.java:584) at com.bumptech.glide.load.engine.DecodeHelper.getLoadData(DecodeHelper.java:205) at com.bumptech.glide.load.engine.DecodeHelper.getCacheKeys(DecodeHelper.java:223) at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:44) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:760) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
It crashes after I take a picture (I have given it all the permissions). Then I tried to replace glide with UniversalImageLoader (https://github.com/nostra13/Android-Universal-Image-Loader) However, it does not seem to accept an Image Object as input (I am newbie). Thanks