Nexus 7 2013 with Android L camera issue: onPreviewFrame not called -
Nexus 7 2013 with Android L camera issue: onPreviewFrame not called -
i have basic photographic camera initialization code gets me preview on acer a500 (android 3.1) , ainol novo 9 (android 4.1.1). i've bought nexus 7 2013, installed android l preview onto it, , found out camera-related code no longer works. photographic camera initialized successfully, no exceptions beingness thrown, including startpreview()
call. however, onpreviewframe
not beingness called @ all. reason?
could because have dummy surfaceview that's not displayed anywhere?
private surfaceview m_surfaceview = new surfaceview(cameratestapplication.instance().getapplicationcontext()); private surfaceholder m_surfaceholder = m_surfaceview.getholder(); void initcamera() { m_openedcamera = camera.open(0); ... m_openedcamera.setpreviewdisplay(m_surfaceholder); m_openedcamera.setpreviewcallback(this); openedcamera.startpreview(); ... }
fixed problem. was, in fact, related artificial surfaceview
- did not enough. however, works:
private surfacetexture m_previewtexture = new surfacetexture(8743); void initcamera() { m_openedcamera = camera.open(0); ... m_openedcamera.setpreviewtexture(m_previewtexture); m_openedcamera.setpreviewcallback(this); openedcamera.startpreview(); ... }
android camera android-camera android-5.0-lollipop
Comments
Post a Comment