Actually I want to enable data connection when I enter wrong password on android phone. I used a ConnectivityManager but it is not working fine. Here is source code for which I used.
ConnectivityManager dataManager;
dataManager =(ConnectivityManager)ctxt.getSystemService(CONNECTIVITY_SERVICE);
Method dataMtd = null;
dataMtd =ConnectivityManager.class.getDeclaredMethod("setMobileDataEnabled", boolean.class);
dataMtd.setAccessible(true);
dataMtd.invoke(dataManager, true);