Android.Content.Context: Method Members

The methods of Android.Content.Context are listed below. For a list of all members, see the Context Members list.

See Also: Inherited members from Java.Lang.Object

Public Methods

abstract
BindService(Intent, IServiceConnection, Bind) : bool
Connect to an application service, creating it if needed.
abstract
CheckCallingOrSelfPermission(string) : Android.Content.PM.Permission
Determine whether the calling process of an IPC or you have been granted a particular permission.
abstract
CheckCallingOrSelfUriPermission(Android.Net.Uri, ActivityFlags) : Android.Content.PM.Permission
Determine whether the calling process of an IPC or you has been granted permission to access a specific URI.
abstract
CheckCallingPermission(string) : Android.Content.PM.Permission
Determine whether the calling process of an IPC you are handling has been granted a particular permission.
abstract
CheckCallingUriPermission(Android.Net.Uri, ActivityFlags) : Android.Content.PM.Permission
Determine whether the calling process and user ID has been granted permission to access a specific URI.
abstract
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.
abstract
CheckUriPermission(Android.Net.Uri, int, int, ActivityFlags) : Android.Content.PM.Permission
Determine whether a particular process and user ID has been granted permission to access a specific URI.
abstract
CheckUriPermission(Android.Net.Uri, string, string, int, int, ActivityFlags) : Android.Content.PM.Permission
Check both a Uri and normal permission.
abstract
ClearWallpaper()
abstract
CreateConfigurationContext(Android.Content.Res.Configuration) : Context
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration.
abstract
CreateDisplayContext(Android.Views.Display) : Context
Return a new Context object for the current Context but whose resources are adjusted to match the metrics of the given Display.
abstract
CreatePackageContext(string, PackageContextFlags) : Context
Return a new Context object for the given application name.
abstract
DatabaseList() : string[]
Returns an array of strings naming the private databases associated with this Context's application package.
abstract
DeleteDatabase(string) : bool
Delete an existing private SQLiteDatabase associated with this Context's application package.
abstract
DeleteFile(string) : bool
Delete the given private file associated with this Context's application package.
abstract
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.
abstract
EnforceCallingOrSelfUriPermission(Android.Net.Uri, 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.
abstract
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.
abstract
EnforceCallingUriPermission(Android.Net.Uri, ActivityFlags, string)
If the calling process and user ID has not been granted permission to access a specific URI, throw Java.Lang.SecurityException.
abstract
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.
abstract
EnforceUriPermission(Android.Net.Uri, int, int, ActivityFlags, string)
If a particular process and user ID has not been granted permission to access a specific URI, throw Java.Lang.SecurityException.
abstract
EnforceUriPermission(Android.Net.Uri, string, string, int, int, ActivityFlags, string)
Enforce both a Uri and normal permission.
abstract
FileList() : string[]
Returns an array of strings naming the private files associated with this Context's application package.
abstract
GetDatabasePath(string) : Java.IO.File
Returns the absolute path on the filesystem where a database created with Context.OpenOrCreateDatabase(string, Android.Content.FileCreationMode, Android.Content.FileCreationMode) is stored.
abstract
GetDir(string, FileCreationMode) : Java.IO.File
Retrieve, creating if needed, a new directory in which the application can place its own custom data files.
GetDrawable(int) : Android.Graphics.Drawables.Drawable
Return a drawable object associated with a particular resource ID and styled for the current theme.
abstract
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.
abstract
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.
abstract
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.
abstract
GetExternalMediaDirs() : Java.IO.File[]
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files.
abstract
GetFileStreamPath(string) : Java.IO.File
Returns the absolute path on the filesystem where a file created with Context.OpenFileOutput(string, Android.Content.FileCreationMode) is stored.
abstract
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.
abstract
GetSharedPreferences(string, FileCreationMode) : ISharedPreferences
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values.
GetString(int) : string
Return a localized string from the application's package's default string table.
GetString(int, params Java.Lang.Object[]) : string
Documentation for this section has not yet been entered.
abstract
GetSystemService(string) : Java.Lang.Object
Return the handle to a system-level service by name.
GetText(int) : string
Documentation for this section has not yet been entered.
GetTextFormatted(int) : Java.Lang.ICharSequence
Return a localized, styled CharSequence from the application's package's default string table.
abstract
GrantUriPermission(string, Android.Net.Uri, 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.
ObtainStyledAttributes(int[]) : Android.Content.Res.TypedArray
Retrieve styled attribute information in this Context's theme.
ObtainStyledAttributes(Android.Util.IAttributeSet, int[]) : Android.Content.Res.TypedArray
Retrieve styled attribute information in this Context's theme.
ObtainStyledAttributes(int, int[]) : Android.Content.Res.TypedArray
Retrieve styled attribute information in this Context's theme.
ObtainStyledAttributes(Android.Util.IAttributeSet, int[], int, int) : Android.Content.Res.TypedArray
Retrieve styled attribute information in this Context's theme.
abstract
OpenFileInput(string) : System.IO.Stream
Open a private file associated with this Context's application package for reading.
abstract
OpenFileOutput(string, FileCreationMode) : System.IO.Stream
Open a private file associated with this Context's application package for writing.
abstract
OpenOrCreateDatabase(string, FileCreationMode, Android.Database.Sqlite.SQLiteDatabase.ICursorFactory) : Android.Database.Sqlite.SQLiteDatabase
Open a new private SQLiteDatabase associated with this Context's application package.
abstract
OpenOrCreateDatabase(string, 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.
abstract
PeekWallpaper() : Android.Graphics.Drawables.Drawable
RegisterComponentCallbacks(IComponentCallbacks)
Add a new Android.Content.IComponentCallbacks to the base application of the Context, which will be called at the same times as the ComponentCallbacks methods of activities and other components are called.
abstract
RegisterReceiver(BroadcastReceiver, IntentFilter) : Intent
Register a BroadcastReceiver to be run in the main activity thread.
abstract
RegisterReceiver(BroadcastReceiver, IntentFilter, string, Android.OS.Handler) : Intent
Register to receive intent broadcasts, to run in the context of scheduler.
abstract
RemoveStickyBroadcast(Intent)
abstract
RemoveStickyBroadcastAsUser(Intent, Android.OS.UserHandle)
abstract
RevokeUriPermission(Android.Net.Uri, ActivityFlags)
Remove all permissions to access a particular content provider Uri that were previously added with Context.GrantUriPermission(string, Android.Net.Uri, Android.Net.Uri).
abstract
SendBroadcast(Intent)
Broadcast the given intent to all interested BroadcastReceivers.
abstract
SendBroadcast(Intent, string)
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced.
abstract
SendBroadcastAsUser(Intent, Android.OS.UserHandle)
Version of Context.SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to.
abstract
SendBroadcastAsUser(Intent, Android.OS.UserHandle, string)
Version of Context.SendBroadcast(Intent, System.String) that allows you to specify the user the broadcast will be sent to.
abstract
SendOrderedBroadcast(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.
abstract
SendOrderedBroadcast(Intent, string, BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
Version of Context.SendBroadcast(Intent) that allows you to receive data back from the broadcast.
abstract
SendOrderedBroadcastAsUser(Intent, Android.OS.UserHandle, string, BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
Version of Context.SendOrderedBroadcast(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.
abstract
SendStickyBroadcast(Intent)
abstract
SendStickyBroadcastAsUser(Intent, Android.OS.UserHandle)
abstract
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
abstract
SendStickyOrderedBroadcastAsUser(Intent, Android.OS.UserHandle, BroadcastReceiver, Android.OS.Handler, Android.App.Result, string, Android.OS.Bundle)
abstract
SetTheme(int)
Set the base theme for this context.
abstract
SetWallpaper(Android.Graphics.Bitmap)
abstract
SetWallpaper(System.IO.Stream)
abstract
StartActivities(Intent[])
Same as Context.StartActivities(Intent[], Android.OS.Bundle) with no options specified.
abstract
StartActivities(Intent[], Android.OS.Bundle)
Launch multiple new activities.
abstract
StartActivity(Intent)
Same as Context.StartActivity(Intent, Android.OS.Bundle) with no options specified.
StartActivity(Type)
Documentation for this section has not yet been entered.
abstract
StartActivity(Intent, Android.OS.Bundle)
Launch a new activity.
abstract
StartInstrumentation(ComponentName, string, Android.OS.Bundle) : bool
Start executing an Android.App.Instrumentation class.
abstract
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, int)
Same as Context.StartIntentSender(IntentSender, Android.Content.Intent, Android.Content.Intent, Android.Content.Intent, Android.Content.Intent, Android.Content.Intent) with no options specified.
abstract
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, int, Android.OS.Bundle)
Like Context.StartActivity(Intent, Android.OS.Bundle), but taking a IntentSender to start.
abstract
StartService(Intent) : ComponentName
Request that a given application service be started.
abstract
StopService(Intent) : bool
Request that a given application service be stopped.
abstract
UnbindService(IServiceConnection)
Disconnect from an application service.
UnregisterComponentCallbacks(IComponentCallbacks)
Remove a Android.Content.IComponentCallbacks object that was previously registered with Context.RegisterComponentCallbacks(IComponentCallbacks).
abstract
UnregisterReceiver(BroadcastReceiver)
Unregister a previously registered BroadcastReceiver.