I am working on the application which is similar to Panorama app.I want to capture the image automatically when device moved from left to right like 360 panorama app works.
I think you are talking about the event handling using accelerometer of the android , you can capture the events like here How to detect shake event with android? , and then can possibly turn on your camera and perform your events.
Also try this http://www.techrepublic.com/blog/app-builder/a-quick-tutorial-on-coding-androids-accelerometer/472
Update :
You need to capture the multiple images and then combine them by using specific algorithm to have the Panoram 360 view on it.
Update 2 :
The algorithm like Image stitching like this : http://en.wikipedia.org/wiki/Image_stitching
Most Important Thing : No one is going to reveal their algorithm on any opensource forum (As per I know)
Have a look at this too : http://www.cs.cornell.edu/courses/cs4670/2010fa/projects/final/results/group_of_acc269_ty244_yc563/cs4670_final.html