1

I am running Media Provider in the emulator. I click scan scan sd card, I get - Unfortunately, Dev Tools has stopped

The reason why I am doing this is I am trying to push images to the android emulator through file explorer and running the scan so that the images come up in the gallery.

Followed this - http://viralpatel.net/blogs/android-trigger-media-scanner-api/ I got - java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED

Then read this - java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED on KitKat only This code does not compile as I need to use MediaScannerConnection.scanFile(context, paths, mimeTypes, callback)scanFile(this, new String[] { I am not able to find an example for this.

Community
  • 1
  • 1

1 Answers1

0

There is an official bug:

https://code.google.com/p/android/issues/detail?id=62134

It is filed for KitKat but is reproducible on 5.0.1 emulator as well.