Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12970] Android: Add ability to check programmatically whether front and rear cameras are supported and switch between them

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.0.1, Release 3.0.2, Release 8.3.0
Fix Version/s2013 Sprint 16, Release 3.2.0
ComponentsAndroid
Labelsandroid, media, mobilesdk, module, module_media, qe-anviladded, qe-testadded
ReporterAshish Nigam
AssigneeBill Dawson
Created2013-03-06T10:25:00.000+0000
Updated2019-11-12T10:33:59.000+0000

Description

In Android it is not possible to check for Rear and front Camera. Also not able to switch between them programmatically. *This seems to me a Bug in documentation* Also i found in documentation that Rear and front camera support doc is either old or wrong. Doc link: http://docs.appcelerator.com/titanium/latest/#!/guide/Camera_and_Photo_Gallery_APIs

Attachments

FileDateSize
app.js2013-07-12T00:06:34.000+00001657

Comments

  1. Bill Dawson 2013-07-12

    Testing Notes

    Run the attached app.js on any Android device. It should accurately tell you which cameras (front/rear/both) are available.
  2. Bill Dawson 2013-07-12

    PR Ready: https://github.com/appcelerator/titanium_mobile/pull/4450
  3. Bill Dawson 2013-07-12

    NOTE: the "switching" part of this ticket will actually be handled in TIMOB-7401.
  4. Federico Casali 2013-10-17

    Verified working as expected. TiSDK 3.2.0.v20131017105330 CLI 3.2.0 Titanium Studio 3.2.0.201310152326 Closing.
  5. Priya Agarwal 2013-10-23

    Verified the fix with: Appc-Studio: 3.2.0.201310230601 Sdk:3.2.0.v20131022171645 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:Google Nexus 7(v4.3), Nexus 4(v4.0.4),HTC Desire(v4.0.3),Google Nexus 7(v4.2.1) Xcode: 5 OS: Mac OSX 10.8 Correctly getting the available camera types. But in HTC Desire(v4.0.3) getting message as "No supported camera on this device"
  6. Ingo Muschenetz 2013-10-24

    Reopening to edit titles
  7. Samir Mohammed 2019-11-08

JSON Source