New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate useFront camera property #335
Conversation
Change-Id: I2520d79c928697939f7deb298a63bcf66b2e5833
Change-Id: I6b88bfc81d7d3468bd0bb45dd7ea609be93dea54
Change-Id: I65a6067cb64f6494e54ae9938bf3750bfcfe76da
I was looking into #180 yesterday. Apparently there exists no intent to specify which camera to use (other than the unofficial) non-working one; the user should decide what camera to use. Unless we want to deal directly with android.hardware.camera, dropping the property is best. For what it's worth, Camcorder currently lacks the property. @halatmit @josmas |
How does the android camera app let the user pick which camera to use? == Hal Abelson On Thu, Mar 26, 2015 at 3:20 PM, osmidy notifications@github.com wrote:
|
Whatever camera app is used by default on the phone should have a button to switch between the front- and back-facing cameras. |
The system camera app, like most camera-using apps, accesses the camera App Inventor has always used an intent to launch the external camera app, Building in direct camera access into app inventor (and no longer launch an I have the deprecation ready to pull, and am waiting for GSoC15 to conclude On Thu, Mar 26, 2015, 3:25 PM hal notifications@github.com wrote:
|
If we could implement the chooser button, then couldn't we implement that == Hal Abelson On Thu, Mar 26, 2015 at 3:30 PM, osmidy notifications@github.com wrote:
|
If we rewrite the camera component completely with the camera API, we will But we don't use the camera API. we simply open the default camera on the A less-critical problem with our current solution is we can't write On Thu, Mar 26, 2015, 3:33 PM hal notifications@github.com wrote:
|
@josmas is GSoC15 sufficiently over yet? This trigger awaits to be pulled. |
Change-Id: I2520d79c928697939f7deb298a63bcf66b2e5833
Change-Id: I6b88bfc81d7d3468bd0bb45dd7ea609be93dea54
Change-Id: I65a6067cb64f6494e54ae9938bf3750bfcfe76da
Rewriting the Camera Component is tricky because of the vast types of devices out there. There is a standard way of doing things neatly that should work on all devices, but it requires a SurfaceView (http://developer.android.com/reference/android/view/SurfaceView.html) with a size of at least 1x1 px . SurfaceView can be achieved by upgrading the Canvas Component. However if you ignore older devices (<API 11) we can use SurfaceTexture (http://developer.android.com/reference/android/graphics/SurfaceTexture.html) to use camera and take pictures without a preview. Again the Camera api has so many settings which are different for different camera sensors. So images taken on some devices with improper settings can give you too dark images (due to very low exposure setting). To fix this there seems to something called AutoFocus(http://developer.android.com/reference/android/hardware/Camera.html#autoFocus(android.hardware.Camera.AutoFocusCallback)). Not to mention the deprecated status of android.hardware.Camera.. The newer one is android.hardware.camera2 (android.hardware.http://developer.android.com/reference/android/hardware/camera2/package-summary.html). This might not be a problem though. Obviously depracating useFront is easy, but I think we should wait till the Canvas Component can be upgraded to show live Camera preview. As of right now it doesnt crash the app if UseFront is checked, it simply ignores because the Camera App doesnt even know the extra intent data being passed) .. One camera App that does accept the UseFront intent data is Camera KK (https://play.google.com/store/apps/details?id=com.moblynx.camerakk&hl=en) .. So UseFront does work with this Camera App linked. |
@marksherman yes, GSoC applications are over (results are not out yet, though) so taking the tag off now. |
@afmckinney @jisqyv |
@marksherman Because you are deprecating a block, you have to update YOUNG_ANDROID_VERSION and the version of the Camerca Component. Make sure the upgrader does the right thing with projects that have the block in use AND have set the useFront property in the designer. The code as written causes projects which set useFront in the designer to fail to load. |
Change-Id: I2520d79c928697939f7deb298a63bcf66b2e5833
Change-Id: I6b88bfc81d7d3468bd0bb45dd7ea609be93dea54
Change-Id: I65a6067cb64f6494e54ae9938bf3750bfcfe76da
…r-sources into deprecateUseFront
Change-Id: I6431eab491527573dbca9c798c402a5c28cc9b10
You know what's funny? The existing useFront currently works perfectly on my OnePlus One (Cyanogen 12s). So current status is that this feature sometimes works, depending on the device and camera app. |
…r-sources into deprecateUseFront
Change-Id: I203c4f70a60aabd4d4c6a7753ec0ff834485e989
I'll do this as soon as we fix the deprecation code. |
Change-Id: I2d3d0d7938841211b568a576b19b3a5503788e6e
Implemented in 27a5823 Closing this one. |
Deprecates the code relating to the property and removes it from the designer.
Fixes #180 (at least in the short term, by taking the feature away)
@josmas @jisqyv