INNER CODE UNIT · Java
isSDCARDMounted
prscX/react-native-photo-editor · android/src/main/java/com/ahmedadeltito/photoeditor/BaseActivity.java:150
protected boolean isSDCARDMounted() {
String status = Environment.getExternalStorageState();
return status.equals(Environment.MEDIA_MOUNTED);
}
// openGallery() method fires once user shows gallery option and GALLERY_INTENT_CALLED and GALLERY_KITKAT_INTENT_CALLED
// are requestCode(s) that will be used in ProfileMediaSherlockFragmetActivity
protected void openGallery() {
int permissionCheck = PermissionChecker.checkCallingOrSelfPermission(this,
android.Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (permissionCheck == PackageManager.PERMISSION_GRANTED) {
if (!isKitKat) {
Intent intent = new Intent();
intent.setType("image/jpeg");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(
Intent.createChooser(intent, getString(R.string.upload_picker_title)),