I'm trying to change proxy for all internet Connection type (Wifi,3G,GPRS) from code (with a button event). and after a couple of minutes change them to what they were. I Searched and know that for change proxy setting from code I need this permissions :
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
but I cant get that permissions to my program. I want my app work for android 2.2 and upper. Can you give me a sample project with android studio?
You can refer below code for adding new wifi setting via reflection, [i have written this code and test on 4.x]