• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Prompting for 3 consecutive photos

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 598
26
Oracle Notepad Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic