react-native-mobile-data-enabled
v0.0.1
Published
A React Native package that checks if mobile data is enabled
Downloads
2
Maintainers
Readme
react-native-mobile-data-enabled
Getting started
$ npm install react-native-mobile-data-enabled
Manual installation
Android
- Set newArchEnabled true if it isn't already in
android/gradle.properties
:# Use this property to enable support to the new architecture. # This will allow you to use TurboModules and the Fabric render in # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. newArchEnabled=true
Usage
import RNMobileData from 'react-native-mobile-data-enabled/js/NativeMobileDataEnabled';
const isEnabled = await RNMobileData?.isEnabled();
console.log(isEnabled);