Taking picture from camera without preview

前端 未结 9 1266
北荒
北荒 2020-11-22 13:01

I am writing an Android 1.5 application which starts just after boot-up. This is a Service and should take a picture without preview. This app will log the ligh

9条回答
  •  悲&欢浪女
    2020-11-22 13:31

    We solved this problem by using a dummy SurfaceView (not added to actual GUI) in versions below 3.0 (or let's say 4.0 as a camera service on a tablet does not really make sense). In versions >= 4.0 this worked in the emulator only ;( The use of SurfaceTexture (and setSurfaceTexture()) instead of SurfaceView (and setSurfaceView()) worked here. At least this works on Nexus S.

    I think this really is a shortcoming of the Android framework.

提交回复
热议问题