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);

App Development Codes For Sketchware



Here is a java code to get the battery percentage of a device.

BatteryManager bm = (BatteryManager)getSystemService(BATTERY_SERVICE);

int batLevel = bm.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY);

textview1.setText(Integer.toString(batLevel));

Comments

Unknown said…
Good blog. I finally got the code for a view pager from this blog. Great home for java codes!

Popular posts from this blog

View Pager

File Picker