I want to trigger media scanner in order to see new photos i have just imported to the device, i was using
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory())));
this way was working perfect, but in android 4.4 (Kitkat) iam getting the following exception
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED
i also tried the MediaScannerConnectionClient
and still i can see the photos that i had imported in the gallery!!!
how to do so in android 4.4? thanks for helping