Turning on off wifi, mobile data, airplane mode

I want to make a control panel sorta app. You can turn airplane mode, mobile data, wifi on off, creates a graph how many wifi usage or mobile data usage etc... However I don't see any extensions that can access mobile data/ wifi. Anyone have any suggestions?

Turning the Internet on/off is not available from the application level for newer versions of Android.

What about Android 10?

As of Android 10, this has been deprecated. And to make an application so that something works only on old phones, it's nonsense to me...The consumption of data is readable. but I wouldn't go in the direction of managing connections on and off.

So it doesn't works? Does it work on below Android 11?
Basically impossible?

Works on android below 10. It does not work when the application targets Api level 29 or higher.This has been blocked for security reasons. So that it is not possible for the app developer to change the connection type without user interaction.