Android.Test.Mock.MockContext: Method Members

The methods of Android.Test.Mock.MockContext are listed below. For a list of all members, see the MockContext Members list.

See Also: Inherited members from Android.Content.Context

Public Methods

override
BindService(Android.Content.Intent, Android.Content.IServiceConnection, Android.Content.Bind) : bool
Connect to an application service, creating it if needed.
override
CheckCallingOrSelfPermission(string) : Android.Content.PM.Permission
Determine whether the calling process of an IPC or you have been granted a particular permission.
override
CheckCallingOrSelfUriPermission(Android.Net.Uri, Android.Content.ActivityFlags) : Android.Content.PM.Permission
Determine whether the calling process of an IPC or you has been granted permission to access a specific URI.
override
CheckCallingPermission(string) : Android.Content.PM.Permission
Determine whether the calling process of an IPC you are handling has been granted a particular permission.
override
CheckCallingUriPermission(Android.Net.Uri, Android.Content.ActivityFlags) : Android.Content.PM.Permission
Determine whether the calling process and user ID has been granted permission to access a specific URI.
override
CheckPermission(string, int, int) : Android.Content.PM.Permission
Determine whether the given permission is allowed for a particular process and user ID running in the system.
override
CheckUriPermission(Android.Net.Uri, int, int, Android.Content.ActivityFlags) : Android.Content.PM.Permission
Determine whether a particular process and user ID has been granted permission to access a specific URI.
override
CheckUriPermission(Android.Net.Uri, string, string, int, int, Android.Content.ActivityFlags) : Android.Content.PM.Permission
Check both a Uri and normal permission.
override
ClearWallpaper()
override
CreateConfigurationContext(Android.Content.Res.Configuration) : Android.Content.Context
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration.
override
CreateDisplayContext(Android.Views.Display) : Android.Content.Context
Return a new Context object for the current Context but whose resources are adjusted to match the metrics of the given Display.
override
CreatePackageContext(string, Android.Content.PackageContextFlags) : Android.Content.Context
Return a new Context object for the given application name.
override
DatabaseList() : string[]
Returns an array of strings naming the private databases associated with this Context's application package.
override
DeleteDatabase(string) : bool
Delete an existing private SQLiteDatabase associated with this Context's application package.
override
DeleteFile(string) : bool
Delete the given private file associated with this Context's application package.
override
EnforceCallingOrSelfPermission(string, string)
If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a Java.Lang.SecurityException.
override
EnforceCallingOrSelfUriPermission(Android.Net.Uri, Android.Content.ActivityFlags, string)
If the calling process of an IPC or you has not been granted permission to access a specific URI, throw Java.Lang.SecurityException.
override
EnforceCallingPermission(string, string)
If the calling process of an IPC you are handling has not been granted a particular permission, throw a Java.Lang.SecurityException.
override
EnforceCallingUriPermission(Android.Net.Uri, Android.Content.ActivityFlags, string)
If the calling process and user ID has not been granted permission to access a specific URI, throw Java.Lang.SecurityException.
override
EnforcePermission(string, int, int, string)
If the given permission is not allowed for a particular process and user ID running in the system, throw a Java.Lang.SecurityException.
override
EnforceUriPermission(Android.Net.Uri, int, int, Android.Content.ActivityFlags, string)
If a particular process and user ID has not been granted permission to access a specific URI, throw Java.Lang.SecurityException.
override
EnforceUriPermission(Android.Net.Uri, string, string, int, int, Android.Content.ActivityFlags, string)
Enforce both a Uri and normal permission.
override
FileList() : string[]
Returns an array of strings naming the private files associated with this Context's application package.
override
GetDatabasePath(string) : Java.IO.File
Returns the absolute path on the filesystem where a database created with Android.Content.Context.OpenOrCreateDatabase(string, Android.Content.FileCreationMode, Android.Content.FileCreationMode) is stored.
override
GetDir(string, Android.Content.FileCreationMode) : Java.IO.File
Retrieve, creating if needed, a new directory in which the application can place its own custom data files.
override
GetExternalCacheDirs() : Java.IO.File[]
Returns absolute paths to application-specific directories on all external storage devices where the application can place cache files it owns.
override
GetExternalFilesDir(string) : Java.IO.File
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on Android.OS.Environment.ExternalStorageDirectory) where the application can place persistent files it owns.
override
GetExternalFilesDirs(string) : Java.IO.File[]
Returns absolute paths to application-specific directories on all external storage devices where the application can place persistent files it owns.
override
GetExternalMediaDirs() : Java.IO.File[]
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files.
override
GetFileStreamPath(string) : Java.IO.File
Returns the absolute path on the filesystem where a file created with Android.Content.Context.OpenFileOutput(string, Android.Content.FileCreationMode) is stored.
override
GetObbDirs() : Java.IO.File[]
Returns absolute paths to application-specific directories on all external storage devices where the application's OBB files (if there are any) can be found.
override
GetSharedPreferences(string, Android.Content.FileCreationMode) : Android.Content.ISharedPreferences
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values.
override
GetSystemService(string) : Java.Lang.Object
Return the handle to a system-level service by name.
override
GrantUriPermission(string, Android.Net.Uri, Android.Content.ActivityFlags)
Grant permission to access a specific Uri to another package, regardless of whether that package has general permission to access the Uri's content provider.
override
OpenFileInput(string) : System.IO.Stream
Open a private file associated with this Context's application package for reading.
override
OpenFileOutput(string, Android.Content.FileCreationMode) : System.IO.Stream
Open a private file associated with this Context's application package for writing.
override
OpenOrCreateDatabase(string, Android.Content.FileCreationMode, Android.Database.Sqlite.SQLiteDatabase.ICursorFactory) : Android.Database.Sqlite.SQLiteDatabase
Open a new private SQLiteDatabase associated with this Context's application package.
override
OpenOrCreateDatabase(string, Android.Content.FileCreationMode, Android.Database.Sqlite.SQLiteDatabase.ICursorFactory, Android.Database.IDatabaseErrorHandler) : Android.Database.Sqlite.SQLiteDatabase
Open a new private SQLiteDatabase associated with this Context's application package.
override
PeekWallpaper() : Android.Graphics.Drawables.Drawable
override
RegisterReceiver(Android.Content.BroadcastReceiver, Android.Content.IntentFilter) : Android.Content.Intent
Register a BroadcastReceiver to be run in the main activity thread.
override
RegisterReceiver(Android.Content.BroadcastReceiver, Android.Content.IntentFilter, string, Android.OS.Handler) : Android.Content.Intent
Register to receive intent broadcasts, to run in the context of scheduler.
override
RemoveStickyBroadcast(Android.Content.Intent)
override
RemoveStickyBroadcastAsUser(Android.Content.Intent, Android.OS.UserHandle)
override
RevokeUriPermission(Android.Net.Uri, Android.Content.ActivityFlags)
Remove all permissions to access a particular content provider Uri that were previously added with Android.Content.Context.GrantUriPermission(string, Android.Net.Uri, Android.Net.Uri).
override
SendBroadcast(Android.Content.Intent)
Broadcast the given intent to all interested BroadcastReceivers.
override
SendBroadcast(Android.Content.Intent, string)
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced.
override
SendBroadcastAsUser(Android.Content.Intent, Android.OS.UserHandle)
Version of Android.Content.Context.SendBroadcast(Android.Content.Intent) that allows you to specify the user the broadcast will be sent to.
override
SendBroadcastAsUser(Android.Content.Intent, Android.OS.UserHandle, string)
Version of Android.Content.Context.SendBroadcast(Android.Content.Intent, System.String) that allows you to specify the user the broadcast will be sent to.
override
SendOrderedBroadcast(Android.Content.Intent, string)
Broadcast the given intent to all interested BroadcastReceivers, delivering them one at a time to allow more preferred receivers to consume the broadcast before it is delivered to less preferred receivers.
override
SendOrderedBroadcast(Android.Content.Intent, string, Android.Content.BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
Version of Android.Content.Context.SendBroadcast(Android.Content.Intent) that allows you to receive data back from the broadcast.
override
SendOrderedBroadcastAsUser(Android.Content.Intent, Android.OS.UserHandle, string, Android.Content.BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
Version of Android.Content.Context.SendOrderedBroadcast(Android.Content.Intent, System.String, System.String, System.String, System.String, System.String, System.String) that allows you to specify the user the broadcast will be sent to.
override
SendStickyBroadcast(Android.Content.Intent)
override
SendStickyBroadcastAsUser(Android.Content.Intent, Android.OS.UserHandle)
override
SendStickyOrderedBroadcast(Android.Content.Intent, Android.Content.BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
override
SendStickyOrderedBroadcastAsUser(Android.Content.Intent, Android.OS.UserHandle, Android.Content.BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
override
SetTheme(int)
Set the base theme for this context.
override
SetWallpaper(Android.Graphics.Bitmap)
override
SetWallpaper(System.IO.Stream)
override
StartActivities(Android.Content.Intent[])
Same as Android.Content.Context.StartActivities(Android.Content.Intent[], Android.OS.Bundle) with no options specified.
override
StartActivities(Android.Content.Intent[], Android.OS.Bundle)
Launch multiple new activities.
override
StartActivity(Android.Content.Intent)
Same as Android.Content.Context.StartActivity(Android.Content.Intent, Android.OS.Bundle) with no options specified.
override
StartActivity(Android.Content.Intent, Android.OS.Bundle)
Launch a new activity.
override
StartInstrumentation(Android.Content.ComponentName, string, Android.OS.Bundle) : bool
Start executing an Android.App.Instrumentation class.
override
StartIntentSender(Android.Content.IntentSender, Android.Content.Intent, Android.Content.ActivityFlags, Android.Content.ActivityFlags, int)
Same as Android.Content.Context.StartIntentSender(Android.Content.IntentSender, Android.Content.Intent, Android.Content.Intent, Android.Content.Intent, Android.Content.Intent, Android.Content.Intent) with no options specified.
override
StartIntentSender(Android.Content.IntentSender, Android.Content.Intent, Android.Content.ActivityFlags, Android.Content.ActivityFlags, int, Android.OS.Bundle)
Like Android.Content.Context.StartActivity(Android.Content.Intent, Android.OS.Bundle), but taking a IntentSender to start.
override
StartService(Android.Content.Intent) : Android.Content.ComponentName
Request that a given application service be started.
override
StopService(Android.Content.Intent) : bool
Request that a given application service be stopped.
override
UnbindService(Android.Content.IServiceConnection)
Disconnect from an application service.
override
UnregisterReceiver(Android.Content.BroadcastReceiver)
Unregister a previously registered BroadcastReceiver.