Reputation: 161
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
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