is there a module or third party module for React Native that would allow me to write an app that would turn on/off mobile network after some task is done? I'm talking about Android devices.
Couldn't find anything in the documentation.
Cheers.
is there a module or third party module for React Native that would allow me to write an app that would turn on/off mobile network after some task is done? I'm talking about Android devices.
Couldn't find anything in the documentation.
Cheers.
I don't see this as a React native issue, basically, you need to write a Native Android plugin (Kotlin/Java) and call that from React native.
About turning off/on data it is not possible on non-rooted devices. I see it as an issue with the security aspects of the mobile device itself. Here is an answer that might help you clarify things - https://stackoverflow.com/a/31482526/1360730
Basically, you need the MODIFY_PHONE_STATE permission which is not given for 3rd party applications.
The closes possible thing would be to open up network settings.