Application 类

定义

用于维护全局应用程序状态的基类。

[Android.Runtime.Register("android/app/Application", DoNotGenerateAcw=true)]
public class Application : Android.Content.ContextWrapper, Android.Content.IComponentCallbacks2, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/Application", DoNotGenerateAcw=true)>]
type Application = class
    inherit ContextWrapper
    interface IComponentCallbacks
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IComponentCallbacks2
继承
派生
属性
实现

注解

用于维护全局应用程序状态的基类。 可以通过创建子类并将此子类的完全限定名称指定为 "android:name" AndroidManifest.xml标记 &lt;application&gt; 中的属性来提供自己的实现。 创建应用程序/包的进程之前,Application 类或 Application 类的子类在任何其他类之前实例化。

<p class=“note”><strong Note: </strong>>通常不需要子类应用程序。 在大多数情况下,静态单一实例可以采用更模块化的方式提供相同的功能。 如果单一实例需要全局上下文(例如注册广播接收器),请在调用单一实例getInstance()的方法时包含android.content.Context#getApplicationContext() Context.getApplicationContext()android.content.Context参数。 </p>

适用于 . 的 android.app.ApplicationJava 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

构造函数

Application()
Application(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

字段

AccessibilityService

#getSystemService(String)用于检索android.view.accessibility.AccessibilityManager用于通过注册的事件侦听器向用户提供 UI 事件的反馈。

(继承自 Context)
AccountService

#getSystemService(String)用于在选择时检索android.accounts.AccountManager用于接收意向的意向。

(继承自 Context)
ActivityService

#getSystemService(String)用于检索与全局系统状态交互的项android.app.ActivityManager

(继承自 Context)
AlarmService

#getSystemService(String)用于在选择时检索android.app.AlarmManager用于接收意向的意向。

(继承自 Context)
AppOpsService

用于 #getSystemService(String) 检索用于跟踪 android.app.AppOpsManager 设备上的应用程序操作。

(继承自 Context)
AppSearchService

#getSystemService(String)用于检索android.app.appsearch.AppSearchManager索引和查询由系统管理的应用数据。

(继承自 Context)
AppwidgetService

#getSystemService(String)用于检索用于访问 AppWidgets 的命令android.appwidget.AppWidgetManager

(继承自 Context)
AudioService

用于 #getSystemService(String) 检索 android.media.AudioManager 用于处理音量、响铃模式和音频路由的管理。

(继承自 Context)
BatteryService

#getSystemService(String)用于检索用于管理电池状态的 Aandroid.os.BatteryManager

(继承自 Context)
BindAllowActivityStarts
已过时.

#bindService标志:如果从可见的应用绑定,则允许绑定服务从后台启动活动。

(继承自 Context)
BindExternalServiceLong

的工作方式与 #BIND_EXTERNAL_SERVICE 相同,但它被定义为 ()

(继承自 Context)
BindNotPerceptible
已过时.

#bindService标志:如果从可见或用户可感知的应用进行绑定,请将目标服务的重要性降低到可感知级别以下。

(继承自 Context)
BindSharedIsolatedProcess
已过时.

标志: #bindIsolatedService将服务绑定到共享隔离进程。

(继承自 Context)
BiometricService

#getSystemService(String)用于检索android.hardware.biometrics.BiometricManager用于处理生物识别和 PIN/模式/密码身份验证。

(继承自 Context)
BlobStoreService

#getSystemService(String)用于从系统维护的 Blob 存储中检索android.app.blob.BlobStoreManager参与和访问数据 Blob。

(继承自 Context)
BluetoothService

#getSystemService(String)用于检索android.bluetooth.BluetoothManager使用蓝牙的用途。

(继承自 Context)
BugreportService

用于捕获 bug 报告的服务。

(继承自 Context)
CameraService

#getSystemService(String)用于检索android.hardware.camera2.CameraManager与相机设备的交互。

(继承自 Context)
CaptioningService

用于 #getSystemService(String) 检索用于获取字幕属性和侦听字幕首选项更改的项 android.view.accessibility.CaptioningManager

(继承自 Context)
CarrierConfigService

用于 #getSystemService(String) 检索 android.telephony.CarrierConfigManager 读取运营商配置值。

(继承自 Context)
ClipboardService

#getSystemService(String)用于检索android.content.ClipboardManager用于访问和修改全局剪贴板的内容。

(继承自 Context)
CompanionDeviceService

#getSystemService(String)用于检索android.companion.CompanionDeviceManager用于管理配套设备

(继承自 Context)
ConnectivityDiagnosticsService

用于 #getSystemService(String) 检索 android.net.ConnectivityDiagnosticsManager 用于执行网络连接诊断以及从系统接收网络连接信息。

(继承自 Context)
ConnectivityService

用于 #getSystemService(String) 检索 android.net.ConnectivityManager 用于处理网络连接管理的信息。

(继承自 Context)
ConsumerIrService

用于 #getSystemService(String) 检索 android.hardware.ConsumerIrManager 用于从设备传输红外信号的信号。

(继承自 Context)
CredentialService

#getSystemService(String)用于检索用户android.credentials.CredentialManager对应用进行身份验证。

(继承自 Context)
CrossProfileAppsService

用于 #getSystemService(String) 检索 android.content.pm.CrossProfileApps 跨配置文件操作。

(继承自 Context)
DeviceIdDefault

默认设备 ID,即主设备(非虚拟)设备的 ID。

(继承自 Context)
DeviceIdInvalid

设备 ID 无效。

(继承自 Context)
DeviceLockService

#getSystemService(String)用于检索 android.devicelock.DeviceLockManager.

(继承自 Context)
DevicePolicyService

#getSystemService(String)用于检索用于处理全局设备策略管理的项android.app.admin.DevicePolicyManager

(继承自 Context)
DisplayHashService

#getSystemService(String)用于访问android.view.displayhash.DisplayHashManager以处理显示哈希。

(继承自 Context)
DisplayService

#getSystemService(String)用于检索android.hardware.display.DisplayManager与显示设备交互的项。

(继承自 Context)
DomainVerificationService

#getSystemService(String)用于检索已声明 Web 域的审批和用户状态。android.content.pm.verify.domain.DomainVerificationManager

(继承自 Context)
DownloadService

android.app.DownloadManager 一起使用#getSystemService(String),用于检索请求 HTTP 下载。

(继承自 Context)
DropboxService

#getSystemService(String)用于检索用于记录诊断日志的android.os.DropBoxManager实例。

(继承自 Context)
EuiccService

#getSystemService(String)用于检索android.telephony.euicc.EuiccManager用于管理设备 eUICC (嵌入式 SIM) 的设备。

(继承自 Context)
FileIntegrityService

#getSystemService(String)用于检索 android.security.FileIntegrityManager.

(继承自 Context)
FingerprintService

用于 #getSystemService(String) 检索用于处理指纹管理的命令 android.hardware.fingerprint.FingerprintManager

(继承自 Context)
GameService

#getSystemService(String)用于检索 GameManager.

(继承自 Context)
GrammaticalInflectionService

#getSystemService(String)用于检索 GrammaticalInflectionManager.

(继承自 Context)
HardwarePropertiesService

用于 #getSystemService(String) 检索 android.os.HardwarePropertiesManager 用于访问硬件属性服务的方法。

(继承自 Context)
HealthconnectService

#getSystemService(String)用于检索 android.health.connect.HealthConnectManager.

(继承自 Context)
InputMethodService

用于 #getSystemService(String) 检索 android.view.inputmethod.InputMethodManager 用于访问输入方法的输入方法。

(继承自 Context)
InputService

#getSystemService(String)用于检索android.hardware.input.InputManager与输入设备交互的项。

(继承自 Context)
IpsecService

#getSystemService(String)用于检索android.net.IpSecManager用于使用 IPSec 加密套接字或网络。

(继承自 Context)
JobSchedulerService

#getSystemService(String)用于检索android.app.job.JobScheduler用于管理偶尔的后台任务的实例。

(继承自 Context)
KeyguardService

#getSystemService(String)用于检索android.app.KeyguardManager用于控制密钥保护的密钥保护。

(继承自 Context)
LauncherAppsService

用于 #getSystemService(String) 检索 android.content.pm.LauncherApps 用于跨用户的配置文件查询和监视可启动的应用。

(继承自 Context)
LayoutInflaterService

用于 #getSystemService(String) 检索用于在此上下文中膨胀布局资源的引用 android.view.LayoutInflater

(继承自 Context)
LocaleService

#getSystemService(String)用于检索 android.app.LocaleManager.

(继承自 Context)
LocationService

android.location.LocationManager 一起使用#getSystemService(String),用于检索用于控制位置更新。

(继承自 Context)
MediaCommunicationService

#getSystemService(String)用于检索android.media.MediaCommunicationManager 用于管理 android.media.MediaSession2

(继承自 Context)
MediaMetricsService

用于 #getSystemService(String) 检索 android.media.metrics.MediaMetricsManager 与设备上的媒体指标交互的项。

(继承自 Context)
MediaProjectionService

用于 #getSystemService(String) 检索 android.media.projection.MediaProjectionManager 用于管理媒体投影会话的实例。

(继承自 Context)
MediaRouterService

#getSystemService用于检索android.media.MediaRouter媒体的控制和管理路由。

(继承自 Context)
MediaSessionService

用于 #getSystemService(String) 检索用于管理媒体会话的命令 android.media.session.MediaSessionManager

(继承自 Context)
MidiService

用于 #getSystemService(String) 检索用于访问 MIDI 服务的 A android.media.midi.MidiManager

(继承自 Context)
NetworkStatsService

用于 #getSystemService(String) 检索用于查询网络使用情况统计信息的查询 android.app.usage.NetworkStatsManager

(继承自 Context)
NfcService

#getSystemService(String)用于检索使用 NFC 的 ANFCandroid.nfc.NfcManager

(继承自 Context)
NotificationService

android.app.NotificationManager 一起使用#getSystemService(String),用于检索通知用户后台事件。

(继承自 Context)
NsdService

用于 #getSystemService(String) 检索 android.net.nsd.NsdManager 用于处理网络服务发现管理

(继承自 Context)
OverlayService

#getSystemService(String)用于检索用于管理覆盖包的集合android.content.om.OverlayManager

(继承自 Context)
PeopleService

#getSystemService(String)用于访问与PeopleManager已发布对话交互的会话。

(继承自 Context)
PerformanceHintService

#getSystemService(String)用于检索android.os.PerformanceHintManager用于访问性能提示服务。

(继承自 Context)
PowerService

#getSystemService(String)用于检索用于控制电源管理(包括“唤醒锁”)的命令android.os.PowerManager,这样就可以在长时间运行任务时使设备保持打开状态。

(继承自 Context)
PrintService

android.print.PrintManager 用于打印和管理打印机和打印任务。

(继承自 Context)
ReceiverExported
已过时.

#registerReceiver标志:接收方可以从其他应用接收广播。

(继承自 Context)
ReceiverNotExported
已过时.

#registerReceiver标志:接收方无法接收来自其他应用的广播。

(继承自 Context)
ReceiverVisibleToInstantApps
已过时.

标志: #registerReceiver接收方可以从即时应用接收广播。

(继承自 Context)
RestrictionsService

用于 #getSystemService(String) 检索 android.content.RestrictionsManager 检索应用程序限制和请求受限操作的权限。

(继承自 Context)
RoleService

用于 #getSystemService(String) 检索 android.app.role.RoleManager 用于管理角色的角色。

(继承自 Context)
SearchService

#getSystemService(String)用于检索android.app.SearchManager用于处理搜索的查询。

(继承自 Context)
SensorService

#getSystemService(String)用于检索用于访问传感器的通道android.hardware.SensorManager

(继承自 Context)
ShortcutService

#getSystemService(String)用于检索用于访问启动器快捷方式服务的命令android.content.pm.ShortcutManager

(继承自 Context)
StatusBarService

#getSystemService(String)用于检索与状态栏和快速设置交互的项android.app.StatusBarManager

(继承自 Context)
StorageService

用于 #getSystemService(String) 检索用于访问系统存储函数的函数 android.os.storage.StorageManager

(继承自 Context)
StorageStatsService

#getSystemService(String)用于检索用于访问系统存储统计信息的集合android.app.usage.StorageStatsManager

(继承自 Context)
SystemHealthService

#getSystemService(String)用于检索用于访问系统运行状况(电池、电源、内存等)指标的指标android.os.health.SystemHealthManager

(继承自 Context)
TelecomService

#getSystemService(String)用于检索设备android.telecom.TelecomManager与电信相关的功能。

(继承自 Context)
TelephonyImsService

#getSystemService(String)用于检索 android.telephony.ims.ImsManager.

(继承自 Context)
TelephonyService

用于 #getSystemService(String) 检索 android.telephony.TelephonyManager 用于处理设备电话功能的管理。

(继承自 Context)
TelephonySubscriptionService

用于 #getSystemService(String) 检索 android.telephony.SubscriptionManager 用于处理设备的电话订阅的管理。

(继承自 Context)
TextClassificationService

#getSystemService(String)用于检索TextClassificationManager文本分类服务。

(继承自 Context)
TextServicesManagerService

用于 #getSystemService(String) 检索 android.view.textservice.TextServicesManager 用于访问文本服务。

(继承自 Context)
TvInputService

#getSystemService(String)用于检索用于在设备上与电视输入进行交互的项android.media.tv.TvInputManager

(继承自 Context)
TvInteractiveAppService

#getSystemService(String)用于检索android.media.tv.interactive.TvInteractiveAppManager设备上用于与电视交互应用程序的交互。

(继承自 Context)
UiModeService

用于 #getSystemService(String) 检索用于控制 UI 模式的控件 android.app.UiModeManager

(继承自 Context)
UsageStatsService

#getSystemService(String)用于检索android.app.usage.UsageStatsManager用于查询设备使用情况统计信息的查询。

(继承自 Context)
UsbService

用于 #getSystemService(String) 检索 android.hardware.usb.UsbManager 对 USB 设备的访问(作为 USB 主机)以及控制此设备作为 USB 设备的行为。

(继承自 Context)
UserService

用于 #getSystemService(String) 检索用于 android.os.UserManager 管理支持多个用户的设备上的用户。

(继承自 Context)
VibratorManagerService

用于 #getSystemService(String) 检索用于访问设备振动器、与单个振动器交互以及对多个振动器播放同步效果的 a android.os.VibratorManager

(继承自 Context)
VibratorService

用于 #getSystemService(String) 检索与振动硬件交互的 A android.os.Vibrator

(继承自 Context)
VirtualDeviceService

用于 #getSystemService(String) 检索用于管理虚拟设备的设备 android.companion.virtual.VirtualDeviceManager

(继承自 Context)
VpnManagementService

#getSystemService(String)用于检索android.net.VpnManager用于管理平台内置 VPN 的配置文件。

(继承自 Context)
WallpaperService

用于 #getSystemService(String) 检索 com。

(继承自 Context)
WifiAwareService

用于 #getSystemService(String) 检索 android.net.wifi.aware.WifiAwareManager 用于处理 Wi-Fi 感知的管理。

(继承自 Context)
WifiP2pService

用于 #getSystemService(String) 检索 android.net.wifi.p2p.WifiP2pManager 用于处理 Wi-Fi 对等连接的管理。

(继承自 Context)
WifiRttRangingService

android.net.wifi.rtt.WifiRttManager/a0#getSystemService(String)> 一起使用,使用 wifi 检索范围设备。

(继承自 Context)
WifiService

用于 #getSystemService(String) 检索 android.net.wifi.WifiManager 用于处理 Wi-Fi 访问的管理。

(继承自 Context)
WindowService

#getSystemService(String)用于检索android.view.WindowManager用于访问系统的窗口管理器。

(继承自 Context)

属性

ApplicationContext

返回当前进程的单个全局 Application 对象的上下文。

(继承自 ContextWrapper)
ApplicationInfo

返回此上下文包的完整应用程序信息。

(继承自 ContextWrapper)
Assets

返回应用程序的包的 AssetManager 实例。

(继承自 ContextWrapper)
AttributionSource

用于维护全局应用程序状态的基类。

(继承自 Context)
AttributionTag

属性可用于复杂应用中,以逻辑方式分隔应用的各个部分。

(继承自 Context)
BaseContext (继承自 ContextWrapper)
CacheDir

返回文件系统上特定于应用程序的缓存目录的绝对路径。

(继承自 ContextWrapper)
Class

返回此 Object的运行时类。

(继承自 Object)
ClassLoader

返回可用于检索此包中的类的类加载程序。

(继承自 ContextWrapper)
CodeCacheDir

返回文件系统上用于存储缓存代码的应用程序特定缓存目录的绝对路径。

(继承自 ContextWrapper)
ContentResolver

返回应用程序的包的 ContentResolver 实例。

(继承自 ContextWrapper)
Context

用于维护全局应用程序状态的基类。

DataDir

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
DeviceId

获取与此上下文关联的设备 ID。

(继承自 Context)
Display

获取与此上下文关联的显示。

(继承自 Context)
ExternalCacheDir

返回主外部文件系统上目录的绝对路径(位于应用程序可以放置其拥有的缓存文件的某个位置 ExternalStorageDirectory )。

(继承自 ContextWrapper)
FilesDir

返回存储使用 OpenFileOutput(String, FileCreationMode) 文件创建的文件系统上的目录的绝对路径。

(继承自 ContextWrapper)
Handle

基础 Android 实例的句柄。

(继承自 Object)
IsDeviceProtectedStorage

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
IsRestricted

指示此上下文是否受到限制。

(继承自 Context)
IsUiContext

如果 true 上下文是可访问 UI 组件的 WindowManagerUI 上下文, android.view.LayoutInflater LayoutInflaterandroid.app.WallpaperManager WallpaperManager返回或 。

(继承自 Context)
JniIdentityHashCode

用于维护全局应用程序状态的基类。

(继承自 Object)
JniPeerMembers

用于维护全局应用程序状态的基类。

MainExecutor

Executor返回将在与此上下文关联的主线程上运行排队任务。

(继承自 Context)
MainLooper

返回当前进程的主线程的 Looper。

(继承自 ContextWrapper)
NoBackupFilesDir

返回文件系统上目录的绝对路径,类似于 FilesDir.

(继承自 ContextWrapper)
ObbDir

返回可在其中找到此应用程序的 OBB 文件(如果有)的主外部存储目录。

(继承自 ContextWrapper)
OpPackageName

返回应该用于 android.app.AppOpsManager 来自此上下文的调用的包名称,以便应用操作管理器的 uid 验证将使用该名称。

(继承自 Context)
PackageCodePath

返回此上下文的主要 Android 包的完整路径。

(继承自 ContextWrapper)
PackageManager

返回 PackageManager 实例以查找全局包信息。

(继承自 ContextWrapper)
PackageName

返回此应用程序的包的名称。

(继承自 ContextWrapper)
PackageResourcePath

返回此上下文的主要 Android 包的完整路径。

(继承自 ContextWrapper)
Params

返回创建此上下文时所使用的参数集(如果通过该 #createContext(ContextParams)参数创建)。

(继承自 Context)
PeerReference

用于维护全局应用程序状态的基类。

(继承自 Object)
ProcessName

返回当前进程的名称。

Resources

返回应用程序的包的资源实例。

(继承自 ContextWrapper)
SynchronizationContext

用于维护全局应用程序状态的基类。

Theme

返回与此上下文关联的 Theme 对象。

(继承自 ContextWrapper)
ThresholdClass

此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。

ThresholdType

此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。

Wallpaper (继承自 ContextWrapper)
WallpaperDesiredMinimumHeight (继承自 ContextWrapper)
WallpaperDesiredMinimumWidth (继承自 ContextWrapper)

方法

AttachBaseContext(Context)

设置此 ContextWrapper 的基本上下文。

(继承自 ContextWrapper)
BindService(Intent, Bind, IExecutor, IServiceConnection)

与执行程序一样 #bindService(Intent, ServiceConnection, int) bindService(Intent, ServiceConnection, int) ,用于控制 ServiceConnection 回调。

(继承自 Context)
BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection)

用于维护全局应用程序状态的基类。

(继承自 Context)
BindService(Intent, IServiceConnection, Bind)

连接到应用程序服务,根据需要创建它。

(继承自 ContextWrapper)
BindService(Intent, IServiceConnection, Context+BindServiceFlags)

用于维护全局应用程序状态的基类。

(继承自 Context)
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle)

用于维护全局应用程序状态的基类。

(继承自 Context)
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle)

以与给定 user 相同的方式 #bindService绑定到服务。

(继承自 Context)
CheckCallingOrSelfPermission(String)

确定 IPC 的调用过程还是你被授予了特定权限。

(继承自 ContextWrapper)
CheckCallingOrSelfUriPermission(Uri, ActivityFlags)

确定 IPC 的调用过程还是已授予访问特定 URI 的权限。

(继承自 ContextWrapper)
CheckCallingOrSelfUriPermissions(IList<Uri>, Int32)

确定 IPC <em>或 you</em> 的调用过程是否被授予访问 URI 列表的权限。

(继承自 Context)
CheckCallingPermission(String)

确定你正在处理的 IPC 的调用过程是否被授予特定权限。

(继承自 ContextWrapper)
CheckCallingUriPermission(Uri, ActivityFlags)

确定调用过程和用户 ID 是否被授予访问特定 URI 的权限。

(继承自 ContextWrapper)
CheckCallingUriPermissions(IList<Uri>, Int32)

确定调用过程和用户 ID 是否被授予访问 URI 列表的权限。

(继承自 Context)
CheckPermission(String, Int32, Int32)

确定是否允许特定进程和系统中运行的用户 ID 的给定权限。

(继承自 ContextWrapper)
CheckSelfPermission(String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
CheckUriPermission(Uri, Int32, Int32, ActivityFlags)

确定是否已向特定进程和用户 ID 授予访问特定 URI 的权限。

(继承自 ContextWrapper)
CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags)

检查 URI 和正常权限。

(继承自 ContextWrapper)
CheckUriPermissions(IList<Uri>, Int32, Int32, Int32)

确定是否向特定进程和用户 ID 授予了访问 URI 列表的权限。

(继承自 Context)
ClearWallpaper()
已过时.
(继承自 ContextWrapper)
Clone()

创建并返回此对象的副本。

(继承自 Object)
CreateAttributionContext(String)

返回当前上下文的新 Context 对象,但将属性返回到其他标记。

(继承自 Context)
CreateConfigurationContext(Configuration)

返回当前上下文的新 Context 对象,但要调整其资源以匹配给定的配置。

(继承自 ContextWrapper)
CreateContext(ContextParams)

创建具有特定属性和行为的上下文。

(继承自 Context)
CreateContextForSplit(String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
CreateDeviceContext(Int32)

从当前上下文中返回一个新 Context 对象,但与设备关联由 < a0 deviceId/> 提供。

(继承自 Context)
CreateDeviceProtectedStorageContext()

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
CreateDisplayContext(Display)

返回当前上下文的新 Context 对象,但其资源经过调整以匹配给定的显示指标。

(继承自 ContextWrapper)
CreatePackageContext(String, PackageContextFlags)

返回给定应用程序名称的新 Context 对象。

(继承自 ContextWrapper)
CreateWindowContext(Display, Int32, Bundle)

为给定Display的窗口android.app.Activity activity创建一Context个非窗口。

(继承自 Context)
CreateWindowContext(Int32, Bundle)

为非活动窗口创建上下文。

(继承自 Context)
DatabaseList()

返回一个字符串数组,该字符串命名与此上下文的应用程序包关联的专用数据库。

(继承自 ContextWrapper)
DeleteDatabase(String)

删除与此上下文的应用程序包关联的现有专用 SQLiteDatabase。

(继承自 ContextWrapper)
DeleteFile(String)

删除与此上下文的应用程序包关联的给定专用文件。

(继承自 ContextWrapper)
DeleteSharedPreferences(String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
Dispose()

用于维护全局应用程序状态的基类。

(继承自 Object)
Dispose(Boolean)

用于维护全局应用程序状态的基类。

(继承自 Object)
EnforceCallingOrSelfPermission(String, String)

如果你和你正在处理的 IPC 的调用过程都未被授予特定权限,则引发一个 SecurityException

(继承自 ContextWrapper)
EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String)

如果 IPC 的调用过程或 尚未授予访问特定 URI 的权限,则引发 SecurityException

(继承自 ContextWrapper)
EnforceCallingPermission(String, String)

如果正在处理的 IPC 的调用过程尚未被授予特定权限,则引发一个 SecurityException

(继承自 ContextWrapper)
EnforceCallingUriPermission(Uri, ActivityFlags, String)

如果调用过程和用户 ID 尚未授予访问特定 URI 的权限,则引发 SecurityException

(继承自 ContextWrapper)
EnforcePermission(String, Int32, Int32, String)

如果系统中运行的特定进程和用户 ID 不允许给定权限,则引发一个 SecurityException

(继承自 ContextWrapper)
EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String)

如果未向特定进程和用户 ID 授予访问特定 URI 的权限,则引发 SecurityException

(继承自 ContextWrapper)
EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String)

强制实施 URI 和普通权限。

(继承自 ContextWrapper)
Equals(Object)

指示其他对象是否“等于”此对象。

(继承自 Object)
FileList()

返回一个字符串数组,用于命名与此上下文的应用程序包关联的专用文件。

(继承自 ContextWrapper)
GetColor(Int32)

返回与特定资源 ID 关联的颜色,并为当前主题设置样式。

(继承自 Context)
GetColorStateList(Int32)

返回与特定资源 ID 关联的颜色状态列表,并为当前主题设置样式。

(继承自 Context)
GetDatabasePath(String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
GetDir(String, FileCreationMode)

根据需要检索、创建应用程序可以放置其自己的自定义数据文件的新目录。

(继承自 ContextWrapper)
GetDrawable(Int32)

返回与特定资源 ID 关联的可绘制对象,并为当前主题设置样式。

(继承自 Context)
GetExternalCacheDirs()

返回应用程序可在应用程序拥有的缓存文件的所有外部存储设备上返回特定于应用程序的目录的绝对路径。

(继承自 ContextWrapper)
GetExternalFilesDir(String)

返回主外部文件系统(位于某个位置 ExternalStorageDirectory)上目录的绝对路径,应用程序可以在其中放置其拥有的永久性文件。

(继承自 ContextWrapper)
GetExternalFilesDirs(String)

返回应用程序在应用程序拥有的所有外部存储设备上特定于应用程序的目录的绝对路径,其中应用程序可以放置其拥有的永久性文件。

(继承自 ContextWrapper)
GetExternalMediaDirs()
已过时.

返回应用程序可在其中放置媒体文件的所有外部存储设备上特定于应用程序的目录的绝对路径。

(继承自 ContextWrapper)
GetFileStreamPath(String)

返回存储使用 OpenFileOutput(String, FileCreationMode) 文件创建的文件系统上的绝对路径。

(继承自 ContextWrapper)
GetHashCode()

返回对象的哈希代码值。

(继承自 Object)
GetObbDirs()

返回应用程序 OBB 文件(如果有)的所有外部存储设备上特定于应用程序的目录的绝对路径(如果有)。

(继承自 ContextWrapper)
GetSharedPreferences(String, FileCreationMode)

检索并保存首选项文件“name”的内容,并返回一个共享首选项,通过该共享首选项可以检索和修改其值。

(继承自 ContextWrapper)
GetString(Int32)

从应用程序包的默认字符串表中返回本地化字符串。

(继承自 Context)
GetString(Int32, Object[])

从应用程序包的默认字符串表中返回本地化字符串。

(继承自 Context)
GetSystemService(Class)

按类将句柄返回到系统级服务。

(继承自 Context)
GetSystemService(String)

按名称将句柄返回到系统级服务。

(继承自 ContextWrapper)
GetSystemServiceName(Class)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
GetText(Int32)

从应用程序包的默认字符串表中返回本地化样式的 CharSequence。

(继承自 Context)
GetTextFormatted(Int32)

从应用程序包的默认字符串表中返回本地化样式的 CharSequence。

(继承自 Context)
GrantUriPermission(String, Uri, ActivityFlags)

无论该包是否具有访问 Uri 的内容提供程序的常规权限,都授予访问另一个包的特定 URI 的权限。

(继承自 ContextWrapper)
JavaFinalize()

当垃圾回收确定不再引用该对象时,由对象上的垃圾回收器调用。

(继承自 Object)
MoveDatabaseFrom(Context, String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
MoveSharedPreferencesFrom(Context, String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
Notify()

唤醒正在等待此对象的监视器的单个线程。

(继承自 Object)
NotifyAll()

唤醒正在等待此对象的监视器的所有线程。

(继承自 Object)
ObtainStyledAttributes(IAttributeSet, Int32[])

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
ObtainStyledAttributes(Int32, Int32[])

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
ObtainStyledAttributes(Int32[])

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
OnConfigurationChanged(Configuration)

当设备配置在组件运行时发生更改时由系统调用。

OnCreate()

在启动应用程序时调用,在创建任何活动、服务或接收方对象(不包括内容提供程序)之前。

OnLowMemory()

当整个系统内存不足时,会调用此方法,并且主动运行的进程应剪裁其内存使用率。

OnTerminate()

此方法用于模拟进程环境。

OnTrimMemory(TrimMemory)

当操作系统确定进程从其进程中剪裁不需要的内存是一个好时机时调用。

OpenFileInput(String)

打开与此上下文的应用程序包关联的专用文件进行读取。

(继承自 ContextWrapper)
OpenFileOutput(String, FileCreationMode)

打开与此上下文的应用程序包关联的专用文件进行写入。

(继承自 ContextWrapper)
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory)

打开与此上下文的应用程序包关联的新专用 SQLiteDatabase。

(继承自 ContextWrapper)
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler)

打开与此上下文的应用程序包关联的新专用 SQLiteDatabase。

(继承自 ContextWrapper)
PeekWallpaper()
已过时.
(继承自 ContextWrapper)
RegisterActivityLifecycleCallbacks(Application+IActivityLifecycleCallbacks)
RegisterComponentCallbacks(IComponentCallbacks)

向上下文的基本应用程序添加新内容 ComponentCallbacks ,它将在调用 ActivityCallbacks 方法和其他组件的同一时间调用。

(继承自 Context)
RegisterDeviceIdChangeListener(IExecutor, IIntConsumer)

向 添加新的设备 ID 更改侦听器 Context,将在系统更改设备关联时调用该侦听器。

(继承自 Context)
RegisterOnProvideAssistDataListener(Application+IOnProvideAssistDataListener)
RegisterReceiver(BroadcastReceiver, IntentFilter)

注册在主活动线程中运行的 BroadcastReceiver。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags)
已过时.

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags)

用于维护全局应用程序状态的基类。

(继承自 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler)

注册以接收意向广播,以在计划程序上下文中运行。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags)
已过时.

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags)

用于维护全局应用程序状态的基类。

(继承自 Context)
RemoveStickyBroadcast(Intent)
已过时.
(继承自 ContextWrapper)
RemoveStickyBroadcastAsUser(Intent, UserHandle)
已过时.
(继承自 ContextWrapper)
RevokeSelfPermissionOnKill(String)

触发运行时权限的异步吊销。

(继承自 Context)
RevokeSelfPermissionsOnKill(ICollection<String>)

触发调用包的一个或多个权限的吊销。

(继承自 Context)
RevokeUriPermission(String, Uri, ActivityFlags)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
RevokeUriPermission(Uri, ActivityFlags)

删除所有权限以访问以前使用 M:Android.Content.Context.GrantUriPermission(System.String,Android.Net.Uri,Android.Net.Uri,Android.Net.Uri)添加的特定内容提供程序 URI。

(继承自 ContextWrapper)
SendBroadcast(Intent)

向所有感兴趣的 BroadcastReceivers 广播给定意向。

(继承自 ContextWrapper)
SendBroadcast(Intent, String)

向所有感兴趣的 BroadcastReceivers 广播给定意向,允许强制实施可选的必需权限。

(继承自 ContextWrapper)
SendBroadcast(Intent, String, Bundle)

向所有感兴趣的 BroadcastReceivers 广播给定意向,允许强制实施可选的必需权限。

(继承自 Context)
SendBroadcastAsUser(Intent, UserHandle)

SendBroadcast(Intent)该版本允许你指定将发送到该广播的用户。

(继承自 ContextWrapper)
SendBroadcastAsUser(Intent, UserHandle, String)

SendBroadcast(Intent, String)该版本允许你指定将发送到该广播的用户。

(继承自 ContextWrapper)
SendBroadcastWithMultiplePermissions(Intent, String[])

向所有感兴趣的 BroadcastReceivers 广播给定意向,允许强制实施所需权限的数组。

(继承自 Context)
SendOrderedBroadcast(Intent, Int32, String, String, BroadcastReceiver, Handler, String, Bundle, Bundle)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
SendOrderedBroadcast(Intent, String)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle)

SendBroadcast(Intent)该版本允许从广播中接收数据。

(继承自 ContextWrapper)
SendOrderedBroadcast(Intent, String, Bundle)

向所有感兴趣的 BroadcastReceivers 广播给定意向,一次传送一个,以允许更多首选接收器在将广播传送到不太首选的接收方之前使用广播。

(继承自 Context)
SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle)

#sendBroadcast(Intent)该版本允许从广播中接收数据。

(继承自 Context)
SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle)

#sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)该版本允许你指定应用操作,以强制限制将广播发送到哪些接收方。

(继承自 Context)
SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
SendStickyBroadcast(Intent)
已过时.

#sendBroadcast(Intent)执行“粘滞”,这意味着在广播完成后发送的意向将保留在周围,以便其他人可以通过返回值#registerReceiver(BroadcastReceiver, IntentFilter)快速检索该数据。

(继承自 ContextWrapper)
SendStickyBroadcast(Intent, Bundle)

#sendBroadcast(Intent)执行“粘滞”,这意味着在广播完成后发送的意向将保留在周围,以便其他人可以通过返回值#registerReceiver(BroadcastReceiver, IntentFilter)快速检索该数据。

(继承自 Context)
SendStickyBroadcastAsUser(Intent, UserHandle)
已过时.
(继承自 ContextWrapper)
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle)
已过时.
(继承自 ContextWrapper)
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle)
已过时.
(继承自 ContextWrapper)
SetHandle(IntPtr, JniHandleOwnership)

设置 Handle 属性。

(继承自 Object)
SetTheme(Int32)

设置此上下文的基本主题。

(继承自 ContextWrapper)
SetWallpaper(Bitmap)
已过时.
(继承自 ContextWrapper)
SetWallpaper(Stream)
已过时.
(继承自 ContextWrapper)
StartActivities(Intent[])

StartActivities(Intent[], Bundle) 未指定任何选项相同。

(继承自 ContextWrapper)
StartActivities(Intent[], Bundle)

启动多个新活动。

(继承自 ContextWrapper)
StartActivity(Intent)

StartActivity(Intent, Bundle) 未指定任何选项相同。

(继承自 ContextWrapper)
StartActivity(Intent, Bundle)

启动新活动。

(继承自 ContextWrapper)
StartActivity(Type)

用于维护全局应用程序状态的基类。

(继承自 Context)
StartForegroundService(Intent)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
StartInstrumentation(ComponentName, String, Bundle)

开始执行类 Instrumentation

(继承自 ContextWrapper)
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32)

用于维护全局应用程序状态的基类。

(继承自 ContextWrapper)
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle)

喜欢 StartActivity(Intent, Bundle),但要开始一个 IntentSender。

(继承自 ContextWrapper)
StartService(Intent)

请求启动给定的应用程序服务。

(继承自 ContextWrapper)
StopService(Intent)

请求停止给定的应用程序服务。

(继承自 ContextWrapper)
ToArray<T>()

用于维护全局应用程序状态的基类。

(继承自 Object)
ToString()

返回对象的字符串表示形式。

(继承自 Object)
UnbindService(IServiceConnection)

断开与应用程序服务的连接。

(继承自 ContextWrapper)
UnregisterActivityLifecycleCallbacks(Application+IActivityLifecycleCallbacks)
UnregisterComponentCallbacks(IComponentCallbacks)

ComponentCallbacks删除以前注册#registerComponentCallbacks(ComponentCallbacks)的对象。

(继承自 Context)
UnregisterDeviceIdChangeListener(IIntConsumer)

从上下文中删除设备 ID 更改的侦听器。

(继承自 Context)
UnregisterFromRuntime()

用于维护全局应用程序状态的基类。

(继承自 Object)
UnregisterOnProvideAssistDataListener(Application+IOnProvideAssistDataListener)
UnregisterReceiver(BroadcastReceiver)

取消注册以前注册的 BroadcastReceiver。

(继承自 ContextWrapper)
UpdateServiceGroup(IServiceConnection, Int32, Int32)

对于以前绑定到 #bindService 或相关方法的服务,请更改系统管理该服务相对于其他进程的过程的方式。

(继承自 Context)
Wait()

使当前线程等待,直到唤醒它,通常是通过 em 通知/em> 或 <em>interrupted</em>。<><

(继承自 Object)
Wait(Int64)

使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted</em>>,或直到经过一定数量的实时。

(继承自 Object)
Wait(Int64, Int32)

使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted</em>>,或直到经过一定数量的实时。

(继承自 Object)

显式接口实现

IJavaPeerable.Disposed()

用于维护全局应用程序状态的基类。

(继承自 Object)
IJavaPeerable.DisposeUnlessReferenced()

用于维护全局应用程序状态的基类。

(继承自 Object)
IJavaPeerable.Finalized()

用于维护全局应用程序状态的基类。

(继承自 Object)
IJavaPeerable.JniManagedPeerState

用于维护全局应用程序状态的基类。

(继承自 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

用于维护全局应用程序状态的基类。

(继承自 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

用于维护全局应用程序状态的基类。

(继承自 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

用于维护全局应用程序状态的基类。

(继承自 Object)

扩展方法

JavaCast<TResult>(IJavaObject)

执行 Android 运行时检查的类型转换。

JavaCast<TResult>(IJavaObject)

用于维护全局应用程序状态的基类。

GetJniTypeName(IJavaPeerable)

用于维护全局应用程序状态的基类。

适用于