I want to create Access Point in android programmatically with the following configurations.
AccessPointName :SomeName
Security:WPA2 PSK
Password
There is a SO Thread at How to create access point programmatically.
However, if you see the code in that link, it is using JAVA Reflection technique to access underlying Android framework API. This is perhaps an indication that there is no direct API to toggle or program these system settings.
Also, looking at API Summary of Settings.System class in Android docs (BTW it is "final" class which gives hint that not too many things will be editable), there is no evidence that Android offers any API for apps to toggle/program system settings.
I gave the reference to that link only to highlight the fact that, to tweak Android system settings Such as APN, there seems to be no public/direct API provided by Android Framework, mostly because of Security Reasons.
We had a requirement in our project where I needed to programatically toggle internet radio, and in another case, I needed to dismiss Telephony dialog.
There is no public API to do that and only way to obtain desired result is using Reflection technique which is neither recommended nor portable and should be avoided.