Class FakeMediaProvider

java.lang.Object
android.content.ContentProvider
org.robolectric.fakes.FakeMediaProvider
All Implemented Interfaces:
ComponentCallbacks, ComponentCallbacks2, ContentInterface

public final class FakeMediaProvider extends ContentProvider
A fake implementation of the content provider in MediaStore. The provider is functional and can be used to populate the android media store in tests.

It currently is a very simplistic implementation compared to the real MediaProvider

Among other limitations, it:

  • Only supports media content queries
  • Only supports single external storage volume
  • Does not support monitoring for file system changes
  • Only supports single user