Check App Info

//By Jetfrican Electro World Intent intent = new Intent(); intent.setAction(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", MainActivity.this.getPackageName(), null); intent.setData(uri); MainActivity.this.startActivity(intent);

Activate Or Deactivate Data Connection

private final static String COMMAND_L_ON = "svc data enable "; private final static String COMMAND_L_OFF = "svc data disable "; private final static String COMMAND_SU = "su"; public static void setConnection(boolean enable,Context context){ String command; if(enable) command = COMMAND_L_ON; else command = COMMAND_L_OFF; try{ java.lang.Process su = Runtime.getRuntime().exec(COMMAND_SU); java.io.DataOutputStream outputStream = new java.io.DataOutputStream(su.getOutputStream()); outputStream.writeBytes(command); outputStream.flush(); outputStream.writeBytes("exit "); outputStream.flush(); try { su.waitFor(); } catch (InterruptedException e) { e.printStackTrace(); } outputStream.close(); }catch(java.io.IOException e){ e.printStackTrace(); } }

Comments

Popular posts from this blog

View Pager

File Picker