To learn camera programming with android, what I did is downloaded some sample programs and opened that as existing projects in android. I am using ubuntu 10.04. The links that I used for camera tutorialis given below.
First download the existing projects. (better to hack an existing one than writing from scratch ;) )- This is the project page : http://github.com/commonsguy/cw-advandroid/tree/master/Camera
- They are read-only copies. git tool is required to get a read only copy.( sudo apt-get install git for ubuntu )
- To get a copy. open a Terminal--create a folder--cd (change directory) to that folder and type git clone https://github.com/commonsguy/cw-advandroid.git This will get a working copy of all the projects in that folder.
- In eclipse File-->New-->Project-->Android project-->create project from existing source, then select the folder <your folder>/cw-advandroid/Camera/Preview ( Preview is one of the project in that list )
- Click Finish.
android:minSdkVersion="3"
android:targetSdkVersion="6"
android:largeScreens="false"
android:normalScreens="true"
android:smallScreens="false"
I simply removed that lines (marked with red) and saved the manifest file. And it worked for me.
So that is it connect the cell to system ( here it is HTC Hero, "configure htc hero" ), then run the project as android application. If you are using samsung galexy configure adb properly.
You will see camera in the cell working. Now you can write applications using camera.
Good Day :)