Taking picture from camera without preview

前端 未结 9 1265
北荒
北荒 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:41

    it is really weird that camera on android platform can't stream video until it given valid preview surface. it seems that the architects of the platform was not thinking about 3rd party video streaming applications at all. even for augmented reality case the picture can be presented as some kind of visual substitution, not real time camera stream.

    anyway, you can simply resize preview surface to 1x1 pixels and put it somewhere in the corner of the widget (visual element). please pay attention - resize preview surface, not camera frame size.

    of course such trick does not eliminate unwanted data streaming (for preview) which consumes some system resources and battery.

提交回复
热议问题