You need to call setPreviewDisplay in surfaceChanged.

And the app shouldn't call setPreviewSize with arbitrary numbers because not
every device support 240x160. Use getPreviewSize in 1.6 or use
getSupportedPreviewSizes in 2.0.

On Fri, Dec 11, 2009 at 3:47 AM, [email protected] <
[email protected]> wrote:

> hi,
> I'm trying to get the preview images of the android Camera onto a
> opengl texture. I have been successful so far, it works most of the
> times. Though sometimes I will just get a black screen when starting/
> resuming the application. I have been debugging for days, not finding
> any clue.
> When debugging I noticed that both the camera callback and the
> onDrawFrame are called in such situations. the bytearray of the camera
> does contain data. though nothing is shown.
> I would really appreciate if someone could help me with this, cause
> problem has been driving me crazy for days.
>
> the source can be browsed/checked out here:
> http://code.google.com/p/andar/source/checkout
>
> --
> 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
>

-- 
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

Reply via email to