Hello Guys, am getting an error when I attach anything from emulator in my app so am getting this error sorry, Grant Storage Permissions FIrst!
please, guys, help me.Thanks
What I have tried:
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
try {
Uri mImageCaptureUri = intent.getData();
String filePath = PathUtil.getPath(this,mImageCaptureUri);
file = new File(filePath);
imageView = (ImageView) findViewById(R.id.your_image);
imageView.setImageURI(mImageCaptureUri);
attachment = 1;
Log.e("URI File" , mImageCaptureUri+"");
} catch (Exception e) {
Toast.makeText(MainActivity.this, "Sorry, Grant Storage Permissions FIrst !", Toast.LENGTH_SHORT).show();
Log.e("Exception Decode" , e + "");
}
}