perumal316
perumal316

Reputation: 1169

How to auto start capturing of picture using native camera

Upon starting my Android app, I want to auto start the native camera (can be done using intents) and start taking pictures automatically for every few seconds.

Can this be done? After starting the camera, how do I initiate this? So that user need not click anything to start the photo taking process.

Thanks In Advance, Perumal

Upvotes: 0

Views: 1146

Answers (3)

Hitesh
Hitesh

Reputation: 331

Keep the button there but set the visibility to gone so that user doesn't see the button.

When you open the camera, use a timer task and then inside the timer task just write:

button.performClick();

here button is the reference to your Button or whatever view you are using. This will capture images automatically, after the time specified by you.

Upvotes: 0

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

If you are using intent, you just fire up installed camera application and have no firther control. If you like to capture images periodically and be in control, you have to use camera service yourself. Here (in source repo) you can find a sample how to fire up camera and capture previews:

http://sourceforge.net/projects/javaocr/

Upvotes: 0

Femi
Femi

Reputation: 64700

There is no support in the camera intents for autocapture. If you want to do that you'll need to actually implement the camera code within your app.

Upvotes: 1

Related Questions