Skip to content

Most visited

Recently visited

Added in API level 1


Utility classes providing stubs or mocks of various Android framework building blocks.

For more information, see the Testing guide.


MockApplication A mock Application class. 
MockContentProvider Mock implementation of ContentProvider. 

An extension of ContentResolver that is designed for testing. 

MockContext A mock Context class. 

A mock Cursor class that isolates the test code from real Cursor implementation. 

MockDialogInterface A mock DialogInterface class. 
MockPackageManager A mock PackageManager class. 
MockResources A mock Resources class. 
This site uses cookies to store your preferences for site-specific language and display options.


This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.