AbstractInputMethodService 类

定义

AbstractInputMethodService 为输入方法提供抽象基类。

[Android.Runtime.Register("android/inputmethodservice/AbstractInputMethodService", DoNotGenerateAcw=true)]
public abstract class AbstractInputMethodService : Android.App.Service, Android.Views.KeyEvent.ICallback, IDisposable
[<Android.Runtime.Register("android/inputmethodservice/AbstractInputMethodService", DoNotGenerateAcw=true)>]
type AbstractInputMethodService = class
    inherit Service
    interface KeyEvent.ICallback
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
继承
AbstractInputMethodService
派生
属性
实现

注解

AbstractInputMethodService 为输入方法提供抽象基类。 普通输入法实现不会直接从此派生,而是基于 InputMethodService 或其他更完整的基类进行构建。 请务必阅读 InputMethod 有关编写输入法的基础知识的详细信息。

此类将服务(表示输入法组件到系统)与输入方法必须实现的 InputMethod 接口相结合。 此基类负责在客户端绑定到该服务时从服务报告 InputMethod,但不提供 InputMethod 接口本身的标准实现。 派生类必须实现该接口。

之后 android.os.Build.VERSION_CODES#S,显示软输入的最大可能区域可能不是整个屏幕。 例如,某些设备可能仅支持在屏幕的一半上显示软输入。

在这种情况下,将软输入从一个半屏幕移动到另一 android.content.res.Resources 个屏幕将触发更新以匹配新 Configuration 内容, AbstractInputMethodService 如果存在明显的配置更改,也可能会收到 #onConfigurationChanged(Configuration) 回调

适用于 . 的 android.inputmethodservice.AbstractInputMethodServiceJava 文档

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

构造函数

名称 说明
AbstractInputMethodService()
AbstractInputMethodService(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)
AdvancedProtectionService

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

(继承自 Context)
AlarmService

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

(继承自 Context)
AppFunctionService

用于 #getSystemService(String) 检索用于执行应用函数的函数 AppFunctionManager

(继承自 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 相同,但它被定义为 long 与它兼容的 BindServiceFlags值。

(继承自 Context)
BindNotPerceptible
已过时.

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

(继承自 Context)
BindPackageIsolatedProcess
已过时.

标志: #bindIsolatedService将服务绑定到共享隔离进程,但仅与其他隔离服务从声明相同进程名称的同一包中绑定。

(继承自 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)
ChooserService

#getSystemService(String)用于检索 android.service.chooser.ChooserManager.

(继承自 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)
ContactKeysService

#getSystemService(String)用于检索管理联系人密钥的密钥E2eeContactKeysManager

(继承自 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

#getSystemService(String) 一起使用android.app.DownloadManager,用于检索请求 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)
KeystoreService

用于 #getSystemService(String) 检索用于访问 Android 密钥存储函数的密钥 android.security.keystore.KeyStoreManager 存储函数。

(继承自 Context)
LauncherAppsService

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

(继承自 Context)
LayoutInflaterService

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

(继承自 Context)
LocaleService

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

(继承自 Context)
LocationService

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

(继承自 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)
MediaQualityService

用于 #getSystemService(String) 检索 android.media.quality.MediaQualityManager 标准化图片和音频 API 参数。

(继承自 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

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

(继承自 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)
PersistentDataBlockService

#getSystemService(String)用于检索android.service.persistentdata.PersistentDataBlockManager实例,以便与驻留在恢复出厂设置中的存储设备进行交互。

(继承自 Context)
PowerService

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

(继承自 Context)
PrintService

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

(继承自 Context)
ProfilingService

#getSystemService(String)用于检索 android.os.ProfilingManager.

(继承自 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)
SatelliteService

#getSystemService(String)用于检索android.telephony.satellite.SatelliteManager访问附属功能。

(继承自 Context)
SearchService

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

(继承自 Context)
SecurityStateService

#getSystemService(String)用于检索用于访问安全状态管理器服务的帐户android.os.SecurityStateManager

(继承自 Context)
SensorService

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

(继承自 Context)
ShortcutService

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

(继承自 Context)
StatusBarService

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

(继承自 Context)
StopForegroundDetach
已过时.

stopForeground(int):如果已设置,则之前提供给 startForeground(int, Notification) 的通知将从服务的生命周期中分离。

(继承自 Service)
StopForegroundLegacy

此常量在 API 级别 33 中已弃用。

(继承自 Service)
StopForegroundRemove
已过时.

stopForeground(int):如果已提供,则之前提供给 startForeground(int, Notification) 的通知将被取消并从显示中删除。

(继承自 Service)
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)
TelephonyPhoneNumberService

#getSystemService(String)用于检索android.telephony.PhoneNumberManager分析电话号码。

(继承自 Context)
TelephonyService

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

(继承自 Context)
TelephonySubscriptionService

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

(继承自 Context)
TetheringService

用于 #getSystemService(String) 检索用于管理系带函数的函数 android.net.TetheringManager

(继承自 Context)
TextClassificationService

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

(继承自 Context)
TextServicesManagerService

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

(继承自 Context)
TvAdService

#getSystemService(String)用于检索用于在设备上与电视客户端播发服务交互的项android.media.tv.ad.TvAdManager

(继承自 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

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

(继承自 Context)
WifiService

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

(继承自 Context)
WindowService

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

(继承自 Context)

属性

名称 说明
Application

返回拥有此服务的应用程序。

(继承自 Service)
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)
DataDir

返回文件系统上属于此应用的所有专用文件的绝对路径。 应用不应直接使用此路径;它们应改用 getFilesDir() 、getCacheDir() 、getDir(String、int) 或其他此类上的存储 API。 如果调用应用移动到采用的存储设备,则返回的路径可能会随时间而变化,因此应仅保留相对路径。 调用应用无需其他权限即可在返回的路径下读取或写入文件。 返回文件

(继承自 ContextWrapper)
DeviceId

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

(继承自 Context)
Display

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

(继承自 Context)
ExternalCacheDir

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

(继承自 ContextWrapper)
FilesDir

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

(继承自 ContextWrapper)
ForegroundServiceType

如果服务通过调用 startForeground(int,Notification)或 startForeground(int,Notification,int),getForegroundServiceType()将返回当前的前台服务类型。

(继承自 Service)
Handle

基础 Android 实例的句柄。

(继承自 Object)
IsDeviceProtectedStorage

指示此上下文的存储 API 是否由受设备保护的存储提供支持。

(继承自 ContextWrapper)
IsRestricted

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

(继承自 Context)
IsUiContext

AbstractInputMethodService 为输入方法提供抽象基类。

JniIdentityHashCode

获取互操作运行时分配给此Java对等的标识哈希代码。

(继承自 Object)
JniManagedPeerState

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
JniPeerMembers

AbstractInputMethodService 为输入方法提供抽象基类。

KeyDispatcherState

返回用于处理来自目标应用程序的事件的全局 KeyEvent.DispatcherState KeyEvent.DispatcherState 值。

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

获取此Java对等方的 JNI 对象引用。

(继承自 Object)
Resources

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

(继承自 ContextWrapper)
Theme

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

(继承自 ContextWrapper)
ThresholdClass

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

ThresholdType

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

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

方法

名称 说明
AttachBaseContext(Context)

设置此 ContextWrapper 的基本上下文。

(继承自 ContextWrapper)
BindIsolatedService(Intent, Context+BindServiceFlags, String, IExecutor, IServiceConnection)

请参阅 bindIsolatedService(Intent,int,String,Executor,ServiceConnection) 调用 BindServiceFlags.of(long),以获取 BindServiceFlags 对象。

(继承自 Context)
BindIsolatedService(Intent, Int32, String, IExecutor, IServiceConnection)

#bindService在独立服务的特定情况下,这种变化允许调用方从单个组件声明生成服务的多个实例。

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

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

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

请参阅 bindService(Intent,int,Executor,ServiceConnection) 调用 BindServiceFlags.of(long),以获取 BindServiceFlags 对象。

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

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

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

请参阅 bindService(Intent,ServiceConnection,int) 调用 BindServiceFlags.of(long),以获取 BindServiceFlags 对象。

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

请参阅 bindServiceAsUser(Intent,ServiceConnection,int,UserHandle) 调用 BindServiceFlags.of(long),以获取 BindServiceFlags 对象。

(继承自 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)

确定调用过程和 uid 是否已获得访问 URI 列表的权限。

(继承自 Context)
CheckContentUriPermissionFull(Uri, Int32, Int32, ActivityFlags)

确定是否已向特定进程和 uid 授予访问特定内容 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)

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

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

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

(继承自 Object)
Construct(JniObjectReference, JniObjectReferenceOptions)

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
CreateAttributionContext(String)

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

(继承自 Context)
CreateConfigurationContext(Configuration)

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

(继承自 ContextWrapper)
CreateContext(ContextParams)

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

(继承自 Context)
CreateContextForSplit(String)

返回给定拆分名称的新 Context 对象。 新上下文具有一个 ClassLoader 和资源对象,该对象可以访问拆分项及其所有依赖项的代码/资源。 每次调用此方法都会返回 Context 对象的新实例;上下文对象不是共享的,但常见的状态(ClassLoader,同一拆分的其他资源)可能是这样上下文本身可以相当轻量级。

(继承自 ContextWrapper)
CreateDeviceContext(Int32)

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

(继承自 Context)
CreateDeviceProtectedStorageContext()

返回当前上下文的新 Context 对象,但其存储 API 由受设备保护的存储提供支持。 在具有直接启动的设备上,存储在此位置的数据使用绑定到物理设备的密钥进行加密,并且可以在设备成功启动后立即访问它(例如,用户通过凭据(例如锁定模式或 PIN)进行身份验证之前和之后。 由于设备保护的数据在没有用户身份验证的情况下可用,因此应仔细限制使用此上下文存储的数据。 例如,强烈建议不要将敏感身份验证令牌或密码存储在设备保护区域中。 如果基础设备无法使用不同的密钥存储受设备保护的数据和凭据保护的数据,则这两个存储区域将同时可用。 它们保留为磁盘上的两个不同的存储位置,并且只有可用性更改窗口。 每次调用此方法都会返回 Context 对象的新实例;上下文对象不是共享的,但通用状态(ClassLoader,相同配置的其他资源)可能是这样,上下文本身可以相当轻量级。 返回上下文

(继承自 ContextWrapper)
CreateDisplayContext(Display)

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

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

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

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

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

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

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

(继承自 Context)
DatabaseList()

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

(继承自 ContextWrapper)
DeleteDatabase(String)

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

(继承自 ContextWrapper)
DeleteFile(String)

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

(继承自 ContextWrapper)
DeleteSharedPreferences(String)

删除现有的共享首选项文件。

(继承自 ContextWrapper)
Dispose()

释放此Java对等方持有的资源。

(继承自 Object)
Dispose(Boolean)

释放此Java对等方持有的资源。

(继承自 Object)
DisposeUnlessReferenced()

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
Dump(FileDescriptor, PrintWriter, String[])

将服务的状态打印到给定流中。

(继承自 Service)
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)

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
Equals(Object)

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

(继承自 Object)
FileList()

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

(继承自 ContextWrapper)
GetColor(Int32)

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

(继承自 Context)
GetColorStateList(Int32)

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

(继承自 Context)
GetDatabasePath(String)

返回使用 openOrCreateDatabase(String, int, CursorFactory) 创建的数据库的文件系统上的绝对路径。 如果调用应用移动到采用的存储设备,则返回的路径可能会随时间而变化,因此应仅保留相对路径。

(继承自 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, Object[])

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

(继承自 Context)
GetString(Int32)

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

(继承自 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[], Int32, Int32)

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

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

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

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

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

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

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

(继承自 Context)
OnBind(Intent)

将信道返回到服务。

OnConfigurationChanged(Configuration)

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

(继承自 Service)
OnCreate()

首次创建服务时由系统调用。

(继承自 Service)
OnCreateInputMethodInterface()

在初始化期间由框架调用,需要创建此服务的 InputMethod 接口。

OnCreateInputMethodSessionInterface()

当输入方法的新客户端需要新的 InputMethodSession 接口时,由框架调用。

OnDestroy()

系统调用,以通知服务不再使用它并正在删除。

(继承自 Service)
OnGenericMotionEvent(MotionEvent)

实现此操作以处理输入方法上的泛型运动事件。

OnKeyDown(Keycode, KeyEvent)

发生键关闭事件时调用。

OnKeyLongPress(Keycode, KeyEvent)

当出现长按时调用。

OnKeyMultiple(Keycode, Int32, KeyEvent)

当用户与模拟控件(如弹球)交互时调用,会多次为同一键生成模拟的向下/向上事件,从而快速连续。

OnKeyUp(Keycode, KeyEvent)

发生键启动事件时调用。

OnLowMemory()

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

(继承自 Service)
OnRebind(Intent)

当新客户端已连接到服务时调用,此前已通知其 onUnbind(Intent)中已断开连接的所有客户端。

(继承自 Service)
OnShouldVerifyKeyEvent(KeyEvent)

AbstractInputMethodService 为输入方法提供抽象基类。

OnStart(Intent, Int32)
已过时.

此方法在 API 级别 15 中已弃用。

(继承自 Service)
OnStartCommand(Intent, StartCommandFlags, Int32)

每次客户端通过调用 Context.startService(Intent)显式启动服务时由系统调用,提供它提供的参数和表示启动请求的唯一整数令牌。

(继承自 Service)
OnTaskRemoved(Intent)

如果服务当前正在运行,并且用户删除了来自服务应用程序的任务,则调用此方法。

(继承自 Service)
OnTimeout(Int32, ForegroundService)

当特定前台服务类型超时时调用的回调。

(继承自 Service)
OnTimeout(Int32)

对ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE的超时调用回调。

(继承自 Service)
OnTrackballEvent(MotionEvent)

实现此操作以处理输入方法上的轨迹球事件。

OnTrimMemory(TrimMemory)

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

(继承自 Service)
OnUnbind(Intent)

当所有客户端都与服务发布的特定接口断开连接时调用。

(继承自 Service)
OpenFileInput(String)

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

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

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

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

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

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

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

(继承自 ContextWrapper)
PeekWallpaper()
已过时.
(继承自 ContextWrapper)
RegisterComponentCallbacks(IComponentCallbacks)

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

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

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

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

注册以接收意向广播,接收方可以选择向即时应用公开。 有关详细信息,请参阅 registerReceiver(BroadcastReceiver,IntentFilter)。 默认情况下,即时应用无法与其他应用程序中的接收方交互,这使你可以公开即时应用可以与之交互的接收器。 有关意向广播的详细信息,请参阅 BroadcastReceiver。 截至Build.VERSION_CODES。UPSIDE_DOWN_CAKE,当应用处于缓存状态时,系统可以在队列中放置上下文注册的广播。 当应用离开缓存状态(例如返回到前台)时,系统将传送任何排队的广播。 某些广播的多个实例可能会合并到一个广播中。 截至Build.VERSION_CODES。ICE_CREAM_SANDWICH,使用此方法注册的接收方将正确遵循为要广播的意向指定的 Intent.setPackage(String)。 在此之前,它将被忽略并传递到所有匹配的已注册接收器。 如果将其用于安全性,请小心。 参数接收器 BroadcastReceiver:此值可能为 null。

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

注册以接收意向广播,接收方可以选择向即时应用公开。 有关详细信息,请参阅 registerReceiver(BroadcastReceiver,IntentFilter)。 默认情况下,即时应用无法与其他应用程序中的接收方交互,这使你可以公开即时应用可以与之交互的接收器。 有关意向广播的详细信息,请参阅 BroadcastReceiver。 截至Build.VERSION_CODES。UPSIDE_DOWN_CAKE,当应用处于缓存状态时,系统可以在队列中放置上下文注册的广播。 当应用离开缓存状态(例如返回到前台)时,系统将传送任何排队的广播。 某些广播的多个实例可能会合并到一个广播中。 截至Build.VERSION_CODES。ICE_CREAM_SANDWICH,使用此方法注册的接收方将正确遵循为要广播的意向指定的 Intent.setPackage(String)。 在此之前,它将被忽略并传递到所有匹配的已注册接收器。 如果将其用于安全性,请小心。 参数接收器 BroadcastReceiver:用于处理广播的 BroadcastReceiver。 此值可以为 null。

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

注册以接收意向广播,以在计划程序上下文中运行。 有关详细信息,请参阅 registerReceiver(BroadcastReceiver、IntentFilter、int) 和 registerReceiver(BroadcastReceiver、IntentFilter、String、Handler)。 有关意向广播的详细信息,请参阅 BroadcastReceiver。 截至Build.VERSION_CODES。UPSIDE_DOWN_CAKE,当应用处于缓存状态时,系统可以在队列中放置上下文注册的广播。 当应用离开缓存状态(例如返回到前台)时,系统将传送任何排队的广播。 某些广播的多个实例可能会合并到一个广播中。 截至Build.VERSION_CODES。ICE_CREAM_SANDWICH,使用此方法注册的接收方将正确遵循为要广播的意向指定的 Intent.setPackage(String)。 在此之前,它将被忽略并传递到所有匹配的已注册接收器。 如果将其用于安全性,请小心。 参数接收器 BroadcastReceiver:此值可能为 null。

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

注册以接收意向广播,以在计划程序上下文中运行。 有关详细信息,请参阅 registerReceiver(BroadcastReceiver、IntentFilter、int) 和 registerReceiver(BroadcastReceiver、IntentFilter、String、Handler)。 有关意向广播的详细信息,请参阅 BroadcastReceiver。 截至Build.VERSION_CODES。UPSIDE_DOWN_CAKE,当应用处于缓存状态时,系统可以在队列中放置上下文注册的广播。 当应用离开缓存状态(例如返回到前台)时,系统将传送任何排队的广播。 某些广播的多个实例可能会合并到一个广播中。 截至Build.VERSION_CODES。ICE_CREAM_SANDWICH,使用此方法注册的接收方将正确遵循为要广播的意向指定的 Intent.setPackage(String)。 在此之前,它将被忽略并传递到所有匹配的已注册接收器。 如果将其用于安全性,请小心。 参数接收器 BroadcastReceiver:用于处理广播的 BroadcastReceiver。

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

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

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

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

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

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

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

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

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

删除对特定目标包的 grantUriPermission(String, Uri, int) 添加的特定内容提供程序 URI 的权限。 给定 URI 将与以前授予的所有 URI 匹配,这些 URI 与给定 URI 的相同或子路径匹配。 也就是说,撤销“content://foo/target”将撤销“content://foo/target”和“content://foo/target/sub”,而不是“content://foo”。 它不会删除更高级别的任何前缀授予。 与 revokeUriPermission(Uri,int)不同,此方法将仅撤销通过 grantUriPermission(String, Uri, int) 显式授予的权限,并且仅撤消指定包的权限。 不会删除通过其他机制(剪贴板、活动启动、服务启动等)进行的任何匹配授予。

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

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

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

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

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

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

(继承自 ContextWrapper)
SendBroadcast(Intent)

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

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

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

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

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

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

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

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

按顺序向感兴趣的接收方广播意向。

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

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

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

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

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

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

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

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

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

向所有感兴趣的 BroadcastReceivers 广播给定意向,一次传送一个,以允许更多首选接收器在将广播传送到不太首选的接收方之前使用广播。 此调用是异步的;它会立即返回,并在接收方运行时继续执行。 有关意向广播的详细信息,请参阅 BroadcastReceiver。

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

sendOrderedBroadcast(Intent,String,BroadcastReceiver,Handler,int,String,Bundle)的版本,允许您指定将向其发送广播的用户。 这不适用于系统映像上未预安装的应用程序。 有关意向广播的详细信息,请参阅 BroadcastReceiver。 需要 android。Manifest.permission.INTERACT_ACROSS_USERS

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

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

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

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

(继承自 ContextWrapper)
SendStickyBroadcastAsUser(Intent, UserHandle)
已过时.
(继承自 ContextWrapper)
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle)
已过时.
(继承自 ContextWrapper)
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle)
已过时.
(继承自 ContextWrapper)
SetForeground(Boolean)

此成员已弃用。

(继承自 Service)
SetHandle(IntPtr, JniHandleOwnership)

设置 Handle 属性。

(继承自 Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions)

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
SetTheme(Int32)

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

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

启动多个新活动。

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

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

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

启动新活动。

(继承自 ContextWrapper)
StartActivity(Intent)

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

(继承自 ContextWrapper)
StartActivity(Type)

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

(继承自 Context)
StartForeground(Int32, Notification, ForegroundService)

带有其他 foregroundServiceType 参数的 startForeground(int,Notification)重载版本。

(继承自 Service)
StartForeground(Int32, Notification)

如果服务已启动(通过 Context.startService(Intent)运行),则还会使此服务在前台运行,从而提供在处于此状态时向用户显示的持续通知。

(继承自 Service)
StartForegroundService(Intent)

类似于 startService(Intent),但具有隐式承诺,服务将在开始运行后调用 startForeground(int,android.app.Notification)。 为该服务提供与 ANR 间隔相当的时间来执行此操作,否则系统会自动崩溃进程,在这种情况下,在运行 SDK 版本Build.VERSION_CODES的设备上记录内部异常 ForegroundServiceDidNotStartInTimeException。S 或更高版本。 在较旧的 Android 版本中,会改为记录内部异常 RemoteServiceException,并显示相应的消息。 与普通 startService(Intent)不同,无论托管服务的应用是否处于前台状态,都可以随时使用此方法。 注意:从 SDK 版本Build.VERSION_CODES开始。S,面向 SDK 版本Build.VERSION_CODES的应用。不允许 S 或更高版本从后台启动前台服务。 有关更多详细信息,请参阅行为更改:面向 Android 12 的应用。

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

开始执行类 Instrumentation

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

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

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

与 startIntentSender(IntentSender、Intent、int、int、int、Bundle)相同,未指定任何选项。

(继承自 ContextWrapper)
StartService(Intent)

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

(继承自 ContextWrapper)
StopForeground(Boolean)

此方法在 API 级别 33 中已弃用。

(继承自 Service)
StopForeground(StopForegroundFlags)

从前台状态中删除此服务,以便在需要更多内存时将其终止。

(继承自 Service)
StopSelf()

如果服务以前已启动,请停止该服务。

(继承自 Service)
StopSelf(Int32)

不返回结果的 stopSelfResult(int) 的旧版本。

(继承自 Service)
StopSelfResult(Int32)

如果最近启动服务的时间是 startId,请停止该服务。

(继承自 Service)
StopService(Intent)

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

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

从此Java数组包装器创建托管数组。

(继承自 Object)
ToString()

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

(继承自 Object)
UnbindService(IServiceConnection)

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

(继承自 ContextWrapper)
UnregisterComponentCallbacks(IComponentCallbacks)

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

(继承自 Context)
UnregisterDeviceIdChangeListener(IIntConsumer)

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

(继承自 Context)
UnregisterFromRuntime()

从互操作运行时取消注册此Java对等。

(继承自 Object)
UnregisterReceiver(BroadcastReceiver)

取消注册以前注册的 BroadcastReceiver。

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

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

(继承自 Context)
Wait()

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

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

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

(继承自 Object)
Wait(Int64)

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

(继承自 Object)

显式接口实现

名称 说明
IJavaPeerable.Disposed()

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
IJavaPeerable.Finalized()

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock

AbstractInputMethodService 为输入方法提供抽象基类。

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

AbstractInputMethodService 为输入方法提供抽象基类。

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

AbstractInputMethodService 为输入方法提供抽象基类。

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

AbstractInputMethodService 为输入方法提供抽象基类。

(继承自 JavaObject)
IJavaPeerable.UnregisterFromRuntime()

AbstractInputMethodService 为输入方法提供抽象基类。

扩展方法

名称 说明
GetJniTypeName(IJavaPeerable)

获取实例 self类型的 JNI 名称。

JavaAs<TResult>(IJavaPeerable)

尝试强制self键入TResult,检查强制是否在Java端有效。

JavaCast<TResult>(IJavaObject)

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

JavaCast<TResult>(IJavaObject)

AbstractInputMethodService 为输入方法提供抽象基类。

TryJavaCast<TResult>(IJavaPeerable, TResult)

尝试强制self键入TResult,检查强制是否在Java端有效。

适用于