I have a fragment that initially opens a camera. Then, when the user goes to look at the preview, that is in a new fragment, so I pass the camera from MainFragment to PreviewFragment. PreviewFragment then makes a callback, passing back the camera, to the main activity when the user selects to take a picture. That activity then gets MainFragment, sets the camera in MainFragment, and a boolean to tell it to take the picture, and replaces the PreviewFragment with MainFragment In onResume, in MainFragment, it sees the boolean set and takes the picture.
I am trying to get this to work properly, but it seems to be very convoluted, and, if you go into PreviewFragment, then hit home, the camera hasn't been released, since I can't free the camera in the onPause method, as I need it, it appears, in order for the picture to be taken. So, what is the best way to use fragments to preview and take pictures. I don't want to have the same fragment do both, as the MainFragment will allow face recognition and marking the faces found, and putting the SurfaceView over the other elements on MainFragment was problematic. If looking at the code that goes through these will help please let me know, but it may just make it more confusing. Thank you. -- Resume & Projects: http://careers.stackoverflow.com/jamesblack "I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant." - Robert McCloskey -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en