23. Check permission status
// In Activity
int permission = ContextCompat.checkSelfPermission(
this, Manifest.permission.WRITE_EXTERNAL_STORAGE
);
if (permission != PackageManager.PERMISSION_GRANTED) {
// not granted
} else {
// granted or pre-Marshmallow
}