0

First of all I'm new as React-Native programmer. Currently I want to add a button to my React-Native(Expo) app, in which the user can turn off or on a setting. Is this possible and if so, how can I do that? For example in Android > Settings > Mobile Networks > Turn off mobile roaming?

Thank you in advance

I have tried to use HeadlessJS or a module called background actions. But there are no well documented examples and I also don't know if those modules answer my question. Because my task is more "straightforward" since I keep the app running in the foreground.

  • Does this answer your question? [How to access device settings programmatically?](https://stackoverflow.com/questions/11985251/how-to-access-device-settings-programmatically) – Abe Dec 07 '22 at 03:30
  • Basically, you can't do it unless you have root on the device. You can deep link the user to Settings and ask them to change it, but that's about as far as they let you go. Which is good, because bad actors would abuse this access if it was granted – Abe Dec 07 '22 at 03:32

0 Answers0