Sorry I have forgotten to say that I need it for my B4A App.
My Android App need a VPN connection to my Router.
Right now I start the VPN setting with an intent.
That works, but with this solution I need to press 5 times the screen.
There is definitely a solution for the problem, because the MyFRITZ! App from AVM has this functionality.