nur
nur

Reputation: 161

how to take picture in android continuously after given interval

i plan to use a service and within which i am gonna call takePicture method using timer. is there any limitation in this procedure?

do i need to setPreviewDisplay every time after taking a picture?

Upvotes: 0

Views: 904

Answers (1)

Graham Smith
Graham Smith

Reputation: 25757

Why do you need a service? From what you have said it sounds like the service will be doing nothing for a large portion of time apart from running a timer to say when to do something regarding picture taking.

Can your architecture utilise an alarm instead? Your user will thank you as it is far less battery intensive plus it handles all the scheduling for you and if the action needs to happen more than once. This is all done via the AlarmManager. An alarm can be scheduled for any time and there are even some useful enumerations of time such as days, hours...etc.

Upvotes: 1

Related Questions