If you need a Surface, you need to have your UI running in the foreground. That is just the way it is.
On Tue, Jul 6, 2010 at 4:13 PM, James Aguilar <[email protected]>wrote: > On Jul 6, 2:23 pm, Dianne Hackborn <[email protected]> wrote: > > No you need to be associated with an Activity UI in some way, so you can > > have a SurfaceView attached to it to. > > I can't really get around needing a Surface, because one is necessary > for setPreviewDisplay on the camera. On the other hand, I have tested > that I can dismiss an Activity from the foreground once I have the > Surface and continue recording video. The Surface seems to be > available in the background as long as it was in the foreground at > _some_ time. So, I've struck on a solution that might be good enough > for my purposes. > > When I need to start recording video, I could start an Activity that > allocates the surface, begins recording, then backgrounds itself. I > haven't looked into it yet, but I assume the Android platform has some > way of remembering what the previous activity was so I can > automatically return to it. Then I can keep recording in that activity > until I'm done, and then stop the Activity somehow. > > I guess that this will result in the screen flickering when the > activity starts up, but it sounds like there is no way around it. Do > you have any suggestions for how I could operate the video recorder > less disruptively than that? Specifically, in a way that would not > interrupt whatever else the user is doing when my program decides to > start recording? > > -- James > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

