ludo / react-native-torch

Torch (flashlight) plugin for React Native (Android/iOS)
MIT License
78 stars 27 forks source link

fix#6 support for torch state checking #11

Open oguennec opened 6 years ago

oguennec commented 6 years ago

This PR adds support for accessing the native torch mode (ON or OFF).

An initial torch switch from react-native is required to get the correct status of the Torch. Subsequent Torch mode switches (from anywhere) are well detected.

This method is currently only supported on Android >= 6.0 and on iOS (>= 8.0).

TwFlem commented 6 years ago

Looks good to me.

udaisshekhawat commented 4 years ago

Hi @TwFlem

Can you please merge this change? We need this change for our App.

Thanks.

HunteRoi commented 7 months ago

@oguennec have you released your version on NPM, since this package does not seem to be maintained anymore?