• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prompting for 3 consecutive photos

 
L Vasquez
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like for the user to capture/choose three consecutive photos on the click of a button. In theory, would this be as simple as for-looping the takeImage() method? If I for-loop that method, onActivityResult would still be entered three times but there are some faults: if the user hits the back button on of one of the three pictures; the loop would continue even though no picture was shown.

Can anybody confirm my idea or please advise me with a better one?
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The back button can always cause issues. Similarly, turning the phone on it's side and putting it in the background. In all these cases you need to be able to determine the current state and decide if the application should continue from where it left off, restart, or not do anything at all.

The first step is to determine the state. So, if you are taking three pictures, you need to know two things: 1) That it is taking pictures. 2) Which picture it is up to.

When the user hits the back button, what happens? If the Activity changes, everything should stop. But if you are capturing the button, you can decide what to do based on the current state.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic