Using 2 Surface Views in same activity

by iblues » Wed, 15 Apr 2009 18:52:21 GMT

Sponsored Links

I am creating an application where I have 2 Surface Views (1 each in
top and bottom half of the screen) along with a button. One of the
Surface will be displaying a camera preview.

The purpose of the action is to swap the preview between each frame.

The problem I am facing is only one SurfaceView's surfaceCreated()
callback is being called. So when I try to set the other SurfaceView
for the camera preview, I get error as it is still not yet created.

My question is when will a surface be actually created? And how can I
accomplish this UI without using Intents?


Using 2 Surface Views in same activity

by Dave Sparks » Thu, 16 Apr 2009 04:45:36 GMT

 I'm pretty sure that this will not work. There is a limit of one video/
camera SurfaceView active at a time.


Sponsored Links

Using 2 Surface Views in same activity

by Girish » Fri, 17 Apr 2009 15:29:06 GMT

 Hi Dave and others,

Any other alternative for acheiving this you can suggest ?



Other Threads

1. Android phones violating german/european laws?


Android is providing a pretty good street navigation, but it might be
unlawful to use it within a car in Germany.

In Germany it is not allowed to use a mobile phone while driving with
your hands, except with hands-free equipment. It does not matter what
functions it has and what you use it for. Just the fact that it is a
phone is sufficient for not beeing allowed to use it while driving.

Therefore, modern cars in europe have built in phones that access your
mobile's SIM card through the remote SIM access bluetooth profile -
just sit in your car, and it automagically takes over the phone
functionality from your mobile. The mobile saves power, but has no
access to the SIM card and thus no phone and internet connections

Unfortunately, the Android OS does not support this bluetooth profile.
Android phones cannot be used with modern european hands-free
equipment, and thus the Android phone must not be used with your hands
at all while driving.

So car navigation with an Android mobile does not make much sense over

But even if Android supported that SIM access bluetooth profile, it
would not help, because then the car radio uses the SIM card and the
Android mobile would not have phone or internet access anymore. As far
as I know, Google Maps and Google Navigation don't have an offline
mode and fully depend on an internet connection.

(Similar problems in most european countries.)

So how would someone use the Android phone in a car in europe?



2. Audio libraries for Android

   I was wondering if there are any audio libraries for the Android
OS? I'm new to Android and am considering developing a music
application. However, popular libraries such as FMOD and Bass, don't
seem to support Android (yet). Are there any others that allow
developers to interact with audio files to levels beyond the basic

Thanks for any advice!


3. ADC 2 Education Winners (top 20) With Links!

4. How can I enable the voice recognition on android phone?

5. Where to request features for the android google apps?

6. Where can license from Google to get Gmail, G map, youtube ...

7. Parental Controls