Widget for turning on/off camera flashlight in android

后端 未结 4 1923
你的背包
你的背包 2020-12-04 10:29

I am developing a widget for turning on/off camera led of phone.

I have made a widget that can work like toggle button (on/off).

Behavior is like follows : S

4条回答
  •  渐次进展
    2020-12-04 11:21

    I have one solution that is not great but works. Have the widget call an Activity, and in the Activity turn the flash on, and later close the Activity. The same to turn it off. If this works in the Activity then this solution will work. It's not elegant but works. I tried it.

提交回复
热议问题