Turn on Camera from widget in Nexus S and Galaxy SII

后端 未结 2 1731
孤独总比滥情好
孤独总比滥情好 2021-01-26 01:56

Problem Description

I am writing a simple Widget for Android Devices. When user press on the widget a Camera Flashlight must turn Off and On. My Widget works f

2条回答
  •  无人共我
    2021-01-26 02:11

    There is no official android API allowing you to manipulate camera flash alone. You have to go via official camera API - and it does not formally define how to manipulate flash LED. YOu can set different modes, but camera software can ignore it at will.

    So, if this works on sony it does not have to vork for other hardware. There could be (and most probably there are) some vendor specific undocumented APIs though.

提交回复
热议问题