Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20352] Android: Implement support for Camera2 API

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterHieu Pham
AssigneeGary Mathews
Created2016-02-04T23:25:33.000+0000
Updated2020-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

Comments

  1. Mike Fogg 2016-08-15

  2. eric harms 2020-04-02

    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)
  3. Michael Gangolf 2020-04-02

    [~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 :)
  4. eric harms 2020-04-02

    Awesome thanks Michael, glad to see this is in the works and is in the pipeline for release!
  5. Michael Gangolf 2020-04-02

    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 ;)
  6. eric harms 2020-04-02

    ah good to know, thanks!

JSON Source