Skip to content
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

improve the camera component #338

Open
halatmit opened this issue Mar 27, 2015 · 12 comments
Open

improve the camera component #338

halatmit opened this issue Mar 27, 2015 · 12 comments
Assignees

Comments

@halatmit
Copy link
Contributor

Access use the Camera API to improve the Camera Compnent. Espcially the ability to control fron-tfacing vs back-facing, and image orientation.

See

http://developer.android.com/guide/topics/media/camera.html

@halatmit
Copy link
Contributor Author

also see pull request #335

@marksherman
Copy link
Member

This is absolutely the right answer.

@josmas
Copy link
Member

josmas commented May 24, 2015

is this taken care of by #363 ?

@halatmit
Copy link
Contributor Author

@josmas
I don't think that #363 covers this, but I'm not sure.

@josmas
Copy link
Member

josmas commented May 24, 2015

#363 is re-writing the component based on an old design from GSoC12 that uses a surface view to do the live feed, instead of the default camera, so this should be scoped into that work.
@thequixotic are you going to work on this over the summer?

@sjais789
Copy link

sjais789 commented Mar 23, 2017

Camera API 2 supports to check whether your device is used to get no of cameras on the device. getCameraIdList() method and getCameraCharacteristics() to add properties like use front_camera or not.
But camera 2 API supports on Android API 21+ (Android 5 - Lollipop).

@thequixotic
Copy link
Contributor

We support App Inventor from API Level 4. We try to be consistent with features so that they are evident on most devices. I don't know if its nice to include it as it might disappoint most users (who use devices below API 21).

@sjais789
Copy link

sjais789 commented Mar 23, 2017

I agree with it but if can we try two code paths for API (>21+) and API (<21+) to solve our front camera issues. @josmas @thequixotic .

capture

`(Please guide me if i am getting it wrong, i want to fix this issue)

@marksherman
Copy link
Member

marksherman commented Mar 23, 2017 via email

@Ang-YC
Copy link

Ang-YC commented Mar 25, 2017

In Block Language, the basic functionalities should include:

when [Camera].Error (message) do
when [Camera].AfterPicture (image) do
when [Camera].Switched do

call [Camera].Open
call [Camera].Close
call [Camera].TakePicture
call [Camera].SwitchCamera

set [Camera].Front to (true/false)

get [Camera].IsOpen (true/false)
get [Camera].Front (true/false)
get [Camera].HaveFront (true/false)
get [Camera]

When [Camera].Front is set to true, it will start the camera using Front Camera, user can also check this value to know if current Camera is Front or Back.

And also other methods inherited from AndroidViewComponent

[Camera].Width, [Camera].Height, [Camera].Visible

This will be implemented using custom SurfaceView with no controls, user can use other components to call the method to take picture.

@marksherman
Copy link
Member

marksherman commented Mar 27, 2017 via email

@Ang-YC
Copy link

Ang-YC commented Apr 6, 2017

I have submitted the code few days ago for GSoC 17 (I hope you are one of them that can read the application) which also includes the link to my modified App Inventor server with Embedded Camera feature. I am not planning to post the link here to prevent server abuse anyway. (Can I send you an email of the link so you can try it on?)

It's tested on Android 2.3, 4.1, 6.0 (real device), Android 2.0, 2.1 (emulator), I think it screws up on Android 1.6 (Not sure what's the problem, logcat shows java.lang.VerifyError: Verifier rejected class)
Compiled APK: https://drive.google.com/file/d/0B-XsmXCo7K41anNOdkRvVThYcmc/view?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants