Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Akul Juneja
589 PointsCalling camera activity using intent
I am working on an android application that is based on image editing.It requires the use of the cell phone camera.As i am a beginner I do not know how to start the camera. I have created a button.On clicking the button,the camera must start and once a picture is clicked,it should return to the main application. Any sort of help would be appreciated. :)
1 Answer
Ben Jakuben
Treehouse TeacherWe will definitely cover this at some point in our Android projects, but for now, there are a few online resources that might help you. Lars Vogel's website has a lot of good tutorials, like this one on the camera: http://www.vogella.com/articles/AndroidCamera/article.html
For your example I would recommend using an Intent to use the camera app rather than trying to do anything custom. Here's the specific sample for that from the above tutorial: http://www.vogella.com/articles/AndroidCamera/article.html#example
The Android Developer site has a good section on using the camera: http://developer.android.com/guide/topics/media/camera.html
And for what it's worth, here's a more complex camera example available on GitHub: https://github.com/josnidhin/Android-Camera-Example