[TIMOB-20352] Android: Implement support for Camera2 API
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Hieu Pham |
Assignee | Gary Mathews |
Created | 2016-02-04T23:25:33.000+0000 |
Updated | 2020-04-02T20:11:07.000+0000 |
Description
Our current Camera implementation still uses android.hardware.camera, which is deprecated last year. We need to implement android.hardware.camera2 and use them on API 21+
Link: http://developer.android.com/intl/zh-cn/reference/android/hardware/camera2/package-summary.html
Hey guys -- anyone looking into this one? Im getting some crashes in my dashboard now about autofocus with SDK 9.0.0. Looks like this ticket has not been updated since March 2017? autoFocus failed autoFocus failed stacktrace: android.hardware.Camera.native_autoFocus(Native Method) android.hardware.Camera.autoFocus(Camera.java:1379) ti.modules.titanium.media.TiCameraActivity$2.onAutoFocus(TiCameraActivity.java:735) android.hardware.Camera$EventHandler.handleMessage(Camera.java:1232) android.os.Handler.dispatchMessage(Handler.java:102) android.os.Looper.loop(Looper.java:148) android.app.ActivityThread.main(ActivityThread.java:5585) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
[~eric.harms@gmail.com] that one should be fixed in 9.0.1: https://github.com/appcelerator/titanium_mobile/pull/11562 If you want to start implementing Camera2 you can have a look at this: https://gist.github.com/m1ga/f95beee242d1e1a75225fc9834b2dfeb it will create a live preview already but wrong aspect ratio and all other features are missing :)
Awesome thanks Michael, glad to see this is in the works and is in the pipeline for release!
Just the focus fix (it is already merged so you can check it with a version from builds.appcelerator.com/) The Camera2 part is nothing official! Just some testing by me ;)
ah good to know, thanks!