I launch default camera using intent and store those camera images in external storage using below path:
File file = new File(Environment.getExternalStorageDirectory()
+ File.separator + fileName);
But it does not show in gallery. The issue comes in nexus 4,7 and moto G devices with OS 4.4.2
I try with
mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri
.parse("file://" + Environment.getExternalStorageDirectory())));
But It not work
You will have to refresh the media scanner cache, try this:
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(yourFile)));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With