Advertisement
Guest User

Mobile Data Android

a guest
May 10th, 2014
493
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None
  1. ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
  2. final Method method = ConnectivityManager.class.getDeclaredMethod("setMobileDataEnabled", Boolean.TYPE);
  3. method.invoke(cm, boolEnabled);
Advertisement
RAW Paste Data Copied
Advertisement