react-native-offline-mode icon indicating copy to clipboard operation
react-native-offline-mode copied to clipboard

Android Support

Open ravitez opened this issue 7 years ago • 5 comments

Works perfectly with IOS. Any plan to support on Android ?

ravitez avatar Mar 15 '17 06:03 ravitez

It works on Android for me

JackThomson2 avatar Mar 21 '17 22:03 JackThomson2

Yes,expected to work on Android as well as it's a js only library. Any specific configuration needed for Android ? I followed the usual setup and added permission for network access on Android*.xml but no luck..

ravitez avatar Mar 22 '17 02:03 ravitez

Hi, it has been a while since I used this component but I think you need this permission: android.permission.ACCESS_NETWORK_STATE

Thanks Jack

JackThomson2 avatar Mar 22 '17 20:03 JackThomson2

I suspect this is an actual issue that will go away with the merging of #7.

grozen avatar Aug 29 '17 11:08 grozen

change from: let connect = (reach) => this.setState({ isConnected: reach !== 'none' }) to: let connect = (reach) => this.setState({ isConnected: reach.toLowerCase() !== 'none' }) because on Android when there is no network connection it will produce 'NONE', but on iOS will be 'none'. so here is the difference and the problem was solved.

NemSothea avatar Aug 31 '17 04:08 NemSothea