InputMethodService 類別

定義

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

[Android.Runtime.Register("android/inputmethodservice/InputMethodService", DoNotGenerateAcw=true)]
public class InputMethodService : Android.InputMethodServices.AbstractInputMethodService
[<Android.Runtime.Register("android/inputmethodservice/InputMethodService", DoNotGenerateAcw=true)>]
type InputMethodService = class
    inherit AbstractInputMethodService
繼承
屬性

備註

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。 請參閱基底類別 AbstractInputMethodServiceInputMethod 介面,了解更多撰寫輸入法的基本資訊。

除了一般的服務生命週期方法外,這個類別還引入了一些新的特定回調,大多數子類別都會想利用:

<UL><LI>#onInitializeInterface() 用於使用者介面初始化,特別是在服務執行時處理設定變更。 < > #onBindInput Li 想了解換新客戶的事。 < > #onStartInput LI 處理一個從客戶端開始的輸入會話。 <li>#onCreateInputView()#onCreateCandidatesView(), 以及 #onCreateExtractTextView() 用於非需求產生的 UI。 < > #onStartInputView(EditorInfo, boolean) LI 來處理從 IME 輸入區域開始的輸入。 </ul>

輸入法在工作方式上擁有相當大的自由裁量權:它 android.inputmethodservice.InputMethodService 為標準 UI 元素(輸入檢視、候選檢視及全螢幕模式)提供基本框架,但如何使用則由特定實作者決定。 例如,一種輸入法可以實作一個帶有鍵盤的輸入區,另一種則允許使用者繪製文字,而第三種則可能沒有輸入區(因此使用者看不到),而是透過聆聽音訊並進行文字轉語音轉換。

在此提供的實作中,所有這些元素都被放在由 InputMethodService 管理的單一視窗中。 它會在需要相關資訊時執行回調,並提供程式化控制的 API。 這些元素的配置有明確定義:

<ul><li>軟輸入視圖(如有)會放在螢幕底部。 <li>候選人視圖(若目前顯示)會被置於軟輸入視圖之上。 <如果>不是全螢幕,應用程式會移動或調整大小以高於這些視圖;如果全螢幕,視窗會完全覆蓋應用程式,其上方會包含應用程式目前正在編輯內容的擷取文字。 </ul>

「SoftInputView」><h3>軟輸入視圖</h3>

大多數輸入法的核心是軟輸入視圖。 大多數使用者互動都發生在這裡:按軟鍵、畫字元,或輸入方式想用的其他方式產生文字。 大多數實作會用自己的視圖來完成所有這些工作,並在被呼叫時 #onCreateInputView() 回傳新的實例。 此時,只要輸入檢視可見,你就能看到使用者互動,並可呼叫 InputMethodService 與應用程式互動。

有些情況下,你會想決定是否要把軟輸入視圖顯示給使用者。 這是透過實作 #onEvaluateInputViewShown() 回傳真或假,根據是否應在當前環境中顯示來實現。 如果你所在州有變動,可能會影響這個狀況,請打電話 #updateInputViewShown() 重新評估。 預設實作總是顯示輸入視圖,除非有硬鍵盤可用,這對大多數輸入方式來說是適當的行為。

「候選人視圖」><h3>候選人視圖</h3>

通常在使用者產生原始文字時,輸入方法會提供一份可選擇使用的可能詮釋清單。 這是透過候選人視圖實現的,就像你實作 #onCreateCandidatesView() 軟輸入視圖來實例自己的視圖,實作候選人的使用者介面一樣。

候選視圖的管理與輸入視圖略有不同,因為候選視圖較為短暫,僅在使用者輸入當前文本可能有候選時才會顯示。 要控制候選人的視角是否被顯示,請使用 #setCandidatesViewShown(boolean)。 請注意,候選視圖通常會被顯示和隱藏,因此它不會像軟輸入視圖那樣影響應用程式的使用者介面:它不會讓應用程式視窗變大,只會在需要時平移視窗讓使用者看到當前焦點。

「全螢幕模式」><h3>全螢幕模式</h3>

有時候你的輸入法介面太大,無法整合到應用程式介面,所以你只想接管整個螢幕。 這是透過切換到全螢幕模式來實現的,使輸入法視窗填滿整個螢幕,並新增自己的「擷取文字」編輯器,顯示正在輸入的文字。 與其他 UI 元素不同,擷取編輯器有標準實作,你不需要更改。 編輯器被置於 IME 的頂端,位於輸入與候選人檢視之上。

類似輸入檢視,你可以透過實作 #onEvaluateFullscreenMode() 回傳真或假,來控制 IME 是否以全螢幕模式運行,這取決於它在當前環境中是否應該是全螢幕。 如果你所在州有變動,可能會影響這個狀況,請打電話 #updateFullscreenMode() 重新評估。 預設實作在螢幕橫向時會選擇全螢幕模式,這對於大多數有顯著輸入區域的輸入方法來說是適當的行為。

在全螢幕模式下,使用者會看到應用程式介面,因此有些特殊需求。 特別是,你應該實作 #onDisplayCompletions(CompletionInfo[]) 顯示申請所產生的完成紀錄,通常在候選人的視圖中,就像你平常展示候選人一樣。

「生成文本」><h3>生成文字</h3>

IME 的關鍵部分當然是產生應用程式所需的文字。 這是透過呼叫 android.view.inputmethod.InputConnection 應用程式介面來完成的,該介面可從 #getCurrentInputConnection()中取得。 此介面允許你產生原始金鑰事件,或若目標支援,直接編輯候選字串與已提交文本。

關於目標的期望與支援資訊可透過 android.view.inputmethod.EditorInfo 類別找到,並透過方法檢索 #getCurrentInputEditorInfo() 。 其中最重要的是 android.view.inputmethod.EditorInfo#inputType EditorInfo.inputType;特別是,如果是 android.view.inputmethod.EditorInfo#TYPE_NULL EditorInfo.TYPE_NULL,表示目標不支援複雜編輯,你只需將原始的金鑰事件送入。 輸入法還會想查看其他數值,例如偵測密碼模式、自動完成文字檢視、電話號碼輸入等。

當使用者在輸入目標間切換時,你會收到指向 #onFinishInput()#onStartInput(EditorInfo, boolean)的呼叫。 你可以用這些來重置並初始化目前目標的輸入狀態。 例如,你常常會想要清除任何輸入狀態,並更新軟鍵盤以符合新的 inputType。

Java 文件 android.inputmethodservice.InputMethodService

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

建構函式

名稱 Description
InputMethodService()
InputMethodService(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

欄位

名稱 Description
AccessibilityService

使用 with #getSystemService(String) 來取得 a android.view.accessibility.AccessibilityManager ,以便透過註冊事件監聽器向使用者提供 UI 事件的回饋。

(繼承來源 Context)
AccountService

使用 with #getSystemService(String) 來取得 a android.accounts.AccountManager 以在你選擇的時間接收意圖。

(繼承來源 Context)
ActivityService

使用 來 #getSystemService(String) 取得 a android.app.ActivityManager 以與全域系統狀態互動。

(繼承來源 Context)
AdvancedProtectionService

使用 以 #getSystemService(String) 取得 android.security.advancedprotection.AdvancedProtectionManager

(繼承來源 Context)
AlarmService

使用 with #getSystemService(String) 來取得 a android.app.AlarmManager 以在你選擇的時間接收意圖。

(繼承來源 Context)
AppFunctionService

用 來#getSystemService(String)取得執行應用程式函式的 。AppFunctionManager

(繼承來源 Context)
AppOpsService

使用 with #getSystemService(String) 來取得 a android.app.AppOpsManager 以追蹤裝置上的應用程式操作。

(繼承來源 Context)
AppSearchService

用 來 #getSystemService(String) 取得 android.app.appsearch.AppSearchManager 系統管理的索引與查詢應用程式資料。

(繼承來源 Context)
AppwidgetService

使用 with #getSystemService(String) 來取得 a android.appwidget.AppWidgetManager 以存取 AppWidgets。

(繼承來源 Context)
AudioService

使用來 #getSystemService(String) 取得 a android.media.AudioManager ,以處理音量管理、鈴聲模式及音訊路由。

(繼承來源 Context)
BatteryService

用 來 #getSystemService(String) 取得 a android.os.BatteryManager 來管理電池狀態。

(繼承來源 Context)
BindAllowActivityStarts
已淘汰.

標記 #bindService:若綁定來自可見的應用程式,綁定服務可從背景啟動活動。

(繼承來源 Context)
BindExternalServiceLong

其運作方式與 相同 #BIND_EXTERNAL_SERVICE,但定義為 longBindServiceFlags相容的值。

(繼承來源 Context)
BindNotPerceptible
已淘汰.

標記: #bindService若綁定來自可見或使用者可感知的應用程式,則將目標服務的重要性降至可感知以下。

(繼承來源 Context)
BindPackageIsolatedProcess
已淘汰.

標記 #bindIsolatedService:將服務綁定為共享的獨立程序,但僅限於與同一套件中宣告相同程序名稱的其他孤立服務綁定。

(繼承來源 Context)
BindSharedIsolatedProcess
已淘汰.

標記為 #bindIsolatedService:將服務綁定成共享且隔離的程序。

(繼承來源 Context)
BiometricService

用 with #getSystemService(String) 來取得 a android.hardware.biometrics.BiometricManager 來處理生物識別和 PIN/模式/密碼驗證。

(繼承來源 Context)
BlobStoreService

使用 with #getSystemService(String) 來取得 a android.app.blob.BlobStoreManager ,以便貢獻並存取系統維護的 blob 儲存庫中的資料 blob。

(繼承來源 Context)
BluetoothService

用 來 #getSystemService(String) 取得 a android.bluetooth.BluetoothManager 以使用藍牙。

(繼承來源 Context)
BugreportService

服務用來擷取錯誤報告。

(繼承來源 Context)
CameraService

用 來 #getSystemService(String) 取得 a android.hardware.camera2.CameraManager 以與相機裝置互動。

(繼承來源 Context)
CaptioningService

使用 with #getSystemService(String) 來取得 android.view.accessibility.CaptioningManager 字幕屬性並聆聽字幕偏好的變化。

(繼承來源 Context)
CarrierConfigService

使用 來 #getSystemService(String) 取得 a android.telephony.CarrierConfigManager 以讀取載波配置值。

(繼承來源 Context)
ClipboardService

使用 with #getSystemService(String) 來取得 a android.content.ClipboardManager ,以便存取並修改全域剪貼簿的內容。

(繼承來源 Context)
CompanionDeviceService

使用 with #getSystemService(String) 來取得 a android.companion.CompanionDeviceManager 以管理伴隨裝置

(繼承來源 Context)
ConnectivityDiagnosticsService

使用來 #getSystemService(String) 取得 a android.net.ConnectivityDiagnosticsManager ,以執行網路連接診斷,並從系統接收網路連接資訊。

(繼承來源 Context)
ConnectivityService

使用 with #getSystemService(String) 來取得 a android.net.ConnectivityManager 以處理網路連線管理。

(繼承來源 Context)
ConsumerIrService

使用時 #getSystemService(String) 可從裝置擷取 a android.hardware.ConsumerIrManager 以傳送紅外線訊號。

(繼承來源 Context)
ContactKeysService

使用來 #getSystemService(String) 取得 A E2eeContactKeysManager 以管理聯絡金鑰。

(繼承來源 Context)
CredentialService

使用 with #getSystemService(String) 來取得 a android.credentials.CredentialManager 以驗證使用者到你的應用程式。

(繼承來源 Context)
CrossProfileAppsService

使用 with #getSystemService(String) 來取得交叉剖面操作的 a android.content.pm.CrossProfileApps

(繼承來源 Context)
DeviceIdDefault

預設裝置 ID,即主要(非虛擬)裝置的 ID。

(繼承來源 Context)
DeviceIdInvalid

裝置 ID 無效。

(繼承來源 Context)
DeviceLockService

使用 with #getSystemService(String) 來取得 android.devicelock.DeviceLockManager

(繼承來源 Context)
DevicePolicyService

使用 with #getSystemService(String) 來取得 a android.app.admin.DevicePolicyManager ,以便處理全域裝置政策管理。

(繼承來源 Context)
DisplayHashService

使用 to #getSystemService(String) 存取 android.view.displayhash.DisplayHashManager 來處理顯示雜湊值。

(繼承來源 Context)
DisplayService

使用 with #getSystemService(String) 來取得 a android.hardware.display.DisplayManager 以與顯示裝置互動。

(繼承來源 Context)
DomainVerificationService

使用 to #getSystemService(String) 存取 android.content.pm.verify.domain.DomainVerificationManager 權以取得已宣告網域的審核與使用者狀態。

(繼承來源 Context)
DownloadService

使用 with #getSystemService(String) 來取得 a android.app.DownloadManager 以請求 HTTP 下載。

(繼承來源 Context)
DropboxService

用 來 #getSystemService(String) 擷取 android.os.DropBoxManager 一個實例來記錄診斷日誌。

(繼承來源 Context)
EuiccService

用 來 #getSystemService(String) 取得 a android.telephony.euicc.EuiccManager 來管理裝置 eUICC(嵌入式 SIM)。

(繼承來源 Context)
FileIntegrityService

使用 以 #getSystemService(String) 取得 android.security.FileIntegrityManager

(繼承來源 Context)
FingerprintService

使用來 #getSystemService(String) 取得指紋管理的 a android.hardware.fingerprint.FingerprintManager

(繼承來源 Context)
GameService

使用 with #getSystemService(String) 來取得 GameManager

(繼承來源 Context)
GrammaticalInflectionService

使用 with #getSystemService(String) 來取得 GrammaticalInflectionManager

(繼承來源 Context)
HardwarePropertiesService

使用 with #getSystemService(String) 來取得 a android.os.HardwarePropertiesManager 以存取硬體屬性服務。

(繼承來源 Context)
HealthconnectService

使用 with #getSystemService(String) 來取得 android.health.connect.HealthConnectManager

(繼承來源 Context)
InputMethodService

使用 with #getSystemService(String) 來取得 a android.view.inputmethod.InputMethodManager 以存取輸入方法。

(繼承來源 Context)
InputService

使用 來 #getSystemService(String) 取得 a android.hardware.input.InputManager 以與輸入裝置互動。

(繼承來源 Context)
IpsecService

使用 with #getSystemService(String) 來取得 a android.net.IpSecManager 以加密 IPSec 的 Sockets 或網路。

(繼承來源 Context)
JobSchedulerService

用 with #getSystemService(String) 來取得 android.app.job.JobScheduler 一個實例,用於管理偶爾的背景任務。

(繼承來源 Context)
KeyguardService

用 來 #getSystemService(String) 取得 a android.app.KeyguardManager 以控制 Keyguard。

(繼承來源 Context)
KeystoreService

使用 with #getSystemService(String) 來取得 a android.security.keystore.KeyStoreManager 以存取 Android Keystore 函式。

(繼承來源 Context)
LauncherAppsService

使用 with #getSystemService(String) 來取得 android.content.pm.LauncherApps 查詢並監控可啟動應用程式的用戶檔案。

(繼承來源 Context)
LayoutInflaterService

在此語境下,使用 with #getSystemService(String) 來取得 a android.view.LayoutInflater ,以膨脹版面資源。

(繼承來源 Context)
LocaleService

使用 with #getSystemService(String) 來取得 android.app.LocaleManager

(繼承來源 Context)
LocationService

使用 with #getSystemService(String) 來取得 a android.location.LocationManager 以控制位置更新。

(繼承來源 Context)
MediaCommunicationService

使用 來 #getSystemService(String) 取得 android.media.MediaCommunicationManager 用於管理 android.media.MediaSession2

(繼承來源 Context)
MediaMetricsService

使用 with #getSystemService(String) 來取得 a android.media.metrics.MediaMetricsManager ,以便與裝置上的媒體指標互動。

(繼承來源 Context)
MediaProjectionService

使用 with #getSystemService(String) 來取得 android.media.projection.MediaProjectionManager 管理媒體投影會話的實例。

(繼承來源 Context)
MediaQualityService

使用 with #getSystemService(String) 來取得 a android.media.quality.MediaQuality ,以標準化圖片和音訊 API 參數。

(繼承來源 Context)
MediaRouterService

使用 with #getSystemService 來取得 a android.media.MediaRouter 以控制和管理媒體路由。

(繼承來源 Context)
MediaSessionService

使用 with #getSystemService(String) 來取得 a android.media.session.MediaSessionManager 以管理媒體會話。

(繼承來源 Context)
MidiService

使用 with #getSystemService(String) 來取得 a android.media.midi.MidiManager 以存取 MIDI 服務。

(繼承來源 Context)
NetworkStatsService

用 來 #getSystemService(String) 取得 a android.app.usage.NetworkStatsManager 以查詢網路使用統計。

(繼承來源 Context)
NfcService

使用 with #getSystemService(String) 來取得 a android.nfc.NfcManager 以使用 NFC。

(繼承來源 Context)
NotificationService

使用 with #getSystemService(String) 來取得 a android.app.NotificationManager ,以通知使用者背景事件。

(繼承來源 Context)
NsdService

使用 with #getSystemService(String) 來取得 a android.net.nsd.NsdManager 以處理網路服務發現管理

(繼承來源 Context)
OverlayService

用 來 #getSystemService(String) 取得 a android.content.om.OverlayManager 以管理覆蓋層套件。

(繼承來源 Context)
PeopleService

使用 with #getSystemService(String) 來存取 a PeopleManager ,與你已發表的對話互動。

(繼承來源 Context)
PerformanceHintService

使用 來 #getSystemService(String) 取得 a android.os.PerformanceHintManager 以存取效能提示服務。

(繼承來源 Context)
PersistentDataBlockService

用 來 #getSystemService(String) 取得 android.service.persistentdata.PersistentDataBlockManager 一個實例,與存在於出廠重置之間的儲存裝置互動。

(繼承來源 Context)
PowerService

用 來 #getSystemService(String) 取得 a android.os.PowerManager 來控制電源管理,包括「wake locks」,讓你在執行長時間任務時保持裝置開啟。

(繼承來源 Context)
PrintService

android.print.PrintManager 用於列印及列印管理及列印任務。

(繼承來源 Context)
ProfilingService

使用 以 #getSystemService(String) 取得 android.os.ProfilingManager

(繼承來源 Context)
ReceiverExported
已淘汰.

標記: #registerReceiver接收器可接收來自其他應用程式的廣播。

(繼承來源 Context)
ReceiverNotExported
已淘汰.

標記 #registerReceiver:接收器無法接收來自其他應用程式的廣播。

(繼承來源 Context)
ReceiverVisibleToInstantApps
已淘汰.

標記: #registerReceiver接收器可接收來自即時應用程式的廣播。

(繼承來源 Context)
RestrictionsService

使用 with #getSystemService(String) 來取得 a android.content.RestrictionsManager ,用於擷取應用程式限制並請求受限制操作的權限。

(繼承來源 Context)
RoleService

使用 with #getSystemService(String) 來取得管理角色的 a android.app.role.RoleManager

(繼承來源 Context)
SatelliteService

使用 with #getSystemService(String) 來取得 a android.telephony.satellite.SatelliteManager 以存取衛星功能。

(繼承來源 Context)
SearchService

使用 with #getSystemService(String) 來取得 a android.app.SearchManager 以處理搜尋。

(繼承來源 Context)
SecurityStateService

使用 with #getSystemService(String) 來取得 a android.os.SecurityStateManager 以存取安全狀態管理器服務。

(繼承來源 Context)
SensorService

用 來 #getSystemService(String) 取得 a android.hardware.SensorManager 以存取感測器。

(繼承來源 Context)
ShortcutService

用 with #getSystemService(String) 來取得 a android.content.pm.ShortcutManager 以存取啟動器捷徑服務。

(繼承來源 Context)
StatusBarService

用 來 #getSystemService(String) 取得 a android.app.StatusBarManager ,以便與狀態列互動及快速設定。

(繼承來源 Context)
StopForegroundDetach
已淘汰.

選擇器 : #stopForeground(int)若設定,先前提供的 #startForeground 通知將與服務生命週期分離。

(繼承來源 Service)
StopForegroundLegacy

選擇器 : #stopForeground(int)等同於傳入 false 舊有 API #stopForeground(boolean)

(繼承來源 Service)
StopForegroundRemove
已淘汰.

選擇器 #stopForeground(int):若提供,先前提供的 #startForeground 通知將被取消並從顯示中移除。

(繼承來源 Service)
StorageService

使用 來 #getSystemService(String) 取得 a android.os.storage.StorageManager 以存取系統儲存函數。

(繼承來源 Context)
StorageStatsService

使用 with #getSystemService(String) 來取得 a android.app.usage.StorageStatsManager 以存取系統儲存統計資料。

(繼承來源 Context)
SystemHealthService

用 來 #getSystemService(String) 取得 android.os.health.SystemHealthManager 系統健康(電池、電力、記憶體等)指標。

(繼承來源 Context)
TelecomService

使用 with #getSystemService(String) 來取得 a android.telecom.TelecomManager 以管理裝置的電信相關功能。

(繼承來源 Context)
TelephonyImsService

使用 以 #getSystemService(String) 取得 android.telephony.ims.ImsManager

(繼承來源 Context)
TelephonyService

使用 來 #getSystemService(String) 取得 a android.telephony.TelephonyManager 以處理裝置的電話功能管理。

(繼承來源 Context)
TelephonySubscriptionService

使用 with #getSystemService(String) 來取得 a android.telephony.SubscriptionManager 以處理裝置的電話訂閱管理。

(繼承來源 Context)
TetheringService

使用 with #getSystemService(String) 來取得 a android.net.TetheringManager 以管理繫網功能。

(繼承來源 Context)
TextClassificationService

使用 with #getSystemService(String) 以取得文字分類服務的 a TextClassificationManager

(繼承來源 Context)
TextServicesManagerService

使用 with #getSystemService(String) 以取得 android.view.textservice.TextServicesManager 文字服務。

(繼承來源 Context)
TvAdService

使用 with #getSystemService(String) 來取得 a android.media.tv.ad.TvAdManager ,以便與裝置上的電視客戶端廣告服務互動。

(繼承來源 Context)
TvInputService

用 來 #getSystemService(String) 取得 a android.media.tv.TvInputManager 以與裝置上的電視輸入互動。

(繼承來源 Context)
TvInteractiveAppService

使用 with #getSystemService(String) 來取得 a android.media.tv.interactive.TvInteractiveAppManager ,以便與裝置上的電視互動應用程式互動。

(繼承來源 Context)
UiModeService

用 來 #getSystemService(String) 取得 a android.app.UiModeManager 來控制 UI 模式。

(繼承來源 Context)
UsageStatsService

用 來 #getSystemService(String) 取得 a android.app.usage.UsageStatsManager 以查詢裝置使用統計。

(繼承來源 Context)
UsbService

用 來 #getSystemService(String) 取得 A android.hardware.usb.UsbManager ,作為 USB 主機存取 USB 裝置,並控制該裝置作為 USB 裝置的行為。

(繼承來源 Context)
UserService

使用 with #getSystemService(String) 來取得 a android.os.UserManager ,以管理支援多使用者的裝置上的使用者。

(繼承來源 Context)
VibratorManagerService

使用來 #getSystemService(String) 取得 a android.os.VibratorManager ,以便存取裝置震動器、與個別震動器互動,並在多個震動器上播放同步效果。

(繼承來源 Context)
VibratorService

使用來 #getSystemService(String) 取得與振動硬體互動的 a android.os.Vibrator

(繼承來源 Context)
VirtualDeviceService

使用 with #getSystemService(String) 來取得 a android.companion.virtual.VirtualDeviceManager 以管理虛擬裝置。

(繼承來源 Context)
VpnManagementService

使用 with #getSystemService(String) 來取得 a android.net.VpnManager 來管理平台內建 VPN 的設定檔。

(繼承來源 Context)
WallpaperService

用 with #getSystemService(String) 來取回通訊器。

(繼承來源 Context)
WifiAwareService

使用 with #getSystemService(String) 來取得 a android.net.wifi.aware.WifiAwareManager 以處理 Wi-Fi Aware。

(繼承來源 Context)
WifiP2pService

使用 with #getSystemService(String) 來取得 a android.net.wifi.p2p.WifiP2pManager 以處理 Wi-Fi 點對點連線的管理。

(繼承來源 Context)
WifiRttRangingService

用 with #getSystemService(String) 來取得 android.net.wifi.rtt.WifiRttManager 帶有 WiFi 的測距裝置。

(繼承來源 Context)
WifiService

使用 with #getSystemService(String) 來取得 a android.net.wifi.WifiManager 以處理 Wi-Fi 存取管理。

(繼承來源 Context)
WindowService

使用 with #getSystemService(String) 來取得 a android.view.WindowManager 以存取系統的視窗管理器。

(繼承來源 Context)

屬性

名稱 Description
Application

回傳擁有這項服務的應用程式。

(繼承來源 Service)
ApplicationContext

回傳目前程序單一全域應用程式物件的上下文。

(繼承來源 ContextWrapper)
ApplicationInfo

請回傳本情境套件的完整應用程式資訊。

(繼承來源 ContextWrapper)
Assets

回傳一個 AssetManager 實例,針對你的應用程式套件。

(繼承來源 ContextWrapper)
AttributionSource

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
AttributionTag

歸因可以在複雜的應用程式中用來邏輯地區分應用程式的各個部分。

(繼承來源 Context)
BackDisposition

取得目前顯示預期回鍵寬度的處置模式。

BaseContext (繼承來源 ContextWrapper)
CacheDir

回傳檔案系統中應用程式專屬快取目錄的絕對路徑。

(繼承來源 ContextWrapper)
CandidatesHiddenVisibility

當候選視圖未顯示時,會回傳該視圖的可見模式(或 View#INVISIBLE View.INVISIBLEView#GONE View.GONE)。

Class

回傳此 Object的執行時類別。

(繼承來源 Object)
ClassLoader

回傳一個你可以用來擷取這個套件裡的類別載入器。

(繼承來源 ContextWrapper)
CodeCacheDir

回傳用於儲存快取程式碼的檔案系統中應用程式專屬快取目錄的絕對路徑。

(繼承來源 ContextWrapper)
ContentResolver

回傳一個 ContentResolver 實例,針對你的應用程式套件。

(繼承來源 ContextWrapper)
CurrentInputBinding

回傳目前啟用的輸入法 InputBinding,若沒有則回傳 null。

CurrentInputConnection

檢索目前綁定在輸入方法上的啟用 InputConnection,若沒有則為 null。

CurrentInputEditorInfo
CurrentInputStarted
DataDir

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
DeviceId

會取得該上下文所關聯的裝置 ID。

(繼承來源 Context)
Display

取得這個情境所關聯的顯示。

(繼承來源 Context)
ExternalCacheDir

回傳主要外部檔案系統目錄的絕對路徑(該目錄位於 ExternalStorageDirectory 應用程式可放置快取檔案的位置)。

(繼承來源 ContextWrapper)
ExtractViewShown

回傳是否顯示全螢幕擷取視圖。

FilesDir

回傳檔案系統中存放檔案 OpenFileOutput(String, FileCreationMode) 的目錄的絕對路徑。

(繼承來源 ContextWrapper)
ForegroundServiceType

如果該服務已透過呼叫成為前台服務 #startForeground(int, Notification)#startForeground(int, Notification, int)#getForegroundServiceType() 回傳當前的前景服務類型。

(繼承來源 Service)
Handle

底層 Android 實例的帳號。

(繼承來源 Object)
InputMethodWindowRecommendedHeight

目標是回傳先前輸入法的 Insets#contentTopInsets,但其實際語意從未被明確定義。

IsDeviceProtectedStorage

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
IsFullscreenMode

回傳輸入法是目前<是 <em>或 em> 正在全螢幕模式下執行。

IsInputViewShown

回傳軟輸入視圖<是目前<為 em>還是>顯示給使用者。

IsRestricted

表示此上下文是否受限。

(繼承來源 Context)
IsShowInputRequested

如果我們被要求顯示輸入視圖,則會回傳為真。

IsUiContext

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 AbstractInputMethodService)
JniIdentityHashCode

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
JniPeerMembers

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

KeyDispatcherState

回傳用於處理目標應用程式事件的全域 KeyEvent.DispatcherState KeyEvent.DispatcherState 檔案。

(繼承來源 AbstractInputMethodService)
LayoutInflater
MainExecutor

回傳 和 Executor ,會在與此上下文相關的主執行緒上執行已排隊的任務。

(繼承來源 Context)
MainLooper

回傳當前程序主執行緒的 Looper。

(繼承來源 ContextWrapper)
MaxWidth

回傳輸入法可用的最大寬度(像素數)。

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

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
Resources

回傳一個應用程式套件的 Resources 實例。

(繼承來源 ContextWrapper)
StylusHandwritingIdleTimeoutMax

回傳用於 的筆寫會話最大閒置超時 #setStylusHandwritingSessionTimeout(Duration)值。

StylusHandwritingSessionTimeout

回傳時長,之後一個尚未收到新 MotionEvents 的筆寫作業會自動超時並 #finishStylusHandwriting() 被呼叫。 -或- 設定持續時間,之後尚未收到新 MotionEvents 的筆寫作業會超時並 #finishStylusHandwriting() 被呼叫。

StylusHandwritingWindow

回傳觸控筆的手寫描線視窗。

Theme

回傳與此上下文相關的主題物件。

(繼承來源 ContextWrapper)
ThresholdClass

此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。

ThresholdType

此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。

Wallpaper (繼承來源 ContextWrapper)
WallpaperDesiredMinimumHeight (繼承來源 ContextWrapper)
WallpaperDesiredMinimumWidth (繼承來源 ContextWrapper)
Window

方法

名稱 Description
AttachBaseContext(Context)

為這個 ContextWrapper 設定基礎上下文。

(繼承來源 ContextWrapper)
BindIsolatedService(Intent, Context+BindServiceFlags, String, IExecutor, IServiceConnection)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 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)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
BindService(Intent, IServiceConnection, Bind)

連接應用程式服務,必要時建立它。

(繼承來源 ContextWrapper)
BindService(Intent, IServiceConnection, Context+BindServiceFlags)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle)

以與 相同的方式#bindService綁定於給定user的服務。

(繼承來源 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)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 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)
CreateAttributionContext(String)

回傳一個新的 Context 物件,針對目前的 Context,但屬性是不同的標籤。

(繼承來源 Context)
CreateConfigurationContext(Configuration)

回傳一個新的 Context 物件,針對目前的 Context,但其資源會調整以符合給定的配置。

(繼承來源 ContextWrapper)
CreateContext(ContextParams)

建立具有特定屬性與行為的情境。

(繼承來源 Context)
CreateContextForSplit(String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
CreateDeviceContext(Int32)

從目前上下文回傳一個新 Context 物件,但裝置關聯由 deviceId給出。

(繼承來源 Context)
CreateDeviceProtectedStorageContext()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
CreateDisplayContext(Display)

回傳一個新的上下文物件,用於當前上下文,但其資源調整以符合該顯示的指標。

(繼承來源 ContextWrapper)
CreatePackageContext(String, PackageContextFlags)

為給定的應用程式名稱回傳一個新的 Context 物件。

(繼承來源 ContextWrapper)
CreateWindowContext(Display, Int32, Bundle)

為給定Display的非窗口android.app.Activity activity創造 a Context

(繼承來源 Context)
CreateWindowContext(Int32, Bundle)

為非活動視窗建立一個上下文。

(繼承來源 Context)
DatabaseList()

回傳一組字串,標示與此上下文應用程式套件相關的私有資料庫。

(繼承來源 ContextWrapper)
DeleteDatabase(String)

刪除與此上下文應用程式套件相關的現有私有 SQLiteDatabase。

(繼承來源 ContextWrapper)
DeleteFile(String)

刪除與此上下文應用程式套件相關的指定私有檔案。

(繼承來源 ContextWrapper)
DeleteSharedPreferences(String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
Dispose()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
Dispose(Boolean)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
Dump(FileDescriptor, PrintWriter, String[])

將服務狀態印入給定的串流中。

(繼承來源 Service)
EnableHardwareAcceleration()
已淘汰.

你可以打電話給它,嘗試啟用 IME 的加速繪圖功能。

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)
FinishConnectionlessStylusHandwriting(ICharSequence)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

FinishConnectionlessStylusHandwriting(String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

FinishStylusHandwriting()

完成目前的觸控筆手寫課程。

GetColor(Int32)

回傳與特定資源 ID 相關且依當前主題設計的顏色。

(繼承來源 Context)
GetColorStateList(Int32)

回傳與特定資源 ID 相關聯的色彩狀態清單,並依當前主題做樣式。

(繼承來源 Context)
GetDatabasePath(String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 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)

取回並保留偏好設定檔「名稱」的內容,回傳一個 SharedPreferences,透過它你可以取回並修改其值。

(繼承來源 ContextWrapper)
GetString(Int32, Object[])

回傳應用程式套件預設字串表中的本地化字串。

(繼承來源 Context)
GetString(Int32)

回傳應用程式套件預設字串表中的本地化字串。

(繼承來源 Context)
GetSystemService(Class)

依類別將句柄回傳至系統層級服務。

(繼承來源 Context)
GetSystemService(String)

以名稱將句柄回傳給系統層級服務。

(繼承來源 ContextWrapper)
GetSystemServiceName(Class)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
GetText(Int32)

從應用程式套件預設字串表回傳一個本地化且有樣式的 CharSequence。

(繼承來源 Context)
GetTextForImeAction(ImeAction)

回傳可用作給定 EditorInfo#imeOptions EditorInfo.imeOptions按鈕標籤的文字。

GetTextForImeActionFormatted(ImeAction)

回傳可用作給定 EditorInfo#imeOptions EditorInfo.imeOptions按鈕標籤的文字。

GetTextFormatted(Int32)

從應用程式套件預設字串表回傳一個本地化且有樣式的 CharSequence。

(繼承來源 Context)
GrantUriPermission(String, Uri, ActivityFlags)

將特定 Uri 存取權限授予另一個套件,不論該套件是否擁有存取該 Uri 內容提供者的一般權限。

(繼承來源 ContextWrapper)
HideStatusIcon()
HideWindow()
JavaFinalize()

當垃圾回收判定該物件不再有相關參考時,由垃圾回收器呼叫。

(繼承來源 Object)
MoveDatabaseFrom(Context, String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
MoveSharedPreferencesFrom(Context, String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
Notify()

喚醒一個正在該物件監視器上等待的執行緒。

(繼承來源 Object)
NotifyAll()

喚醒所有等待該物件監視器的執行緒。

(繼承來源 Object)
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

在此上下文主題中檢索樣式屬性資訊。

(繼承來源 Context)
ObtainStyledAttributes(IAttributeSet, Int32[])

在此上下文主題中檢索樣式屬性資訊。

(繼承來源 Context)
ObtainStyledAttributes(Int32, Int32[])

在此上下文主題中檢索樣式屬性資訊。

(繼承來源 Context)
ObtainStyledAttributes(Int32[])

在此上下文主題中檢索樣式屬性資訊。

(繼承來源 Context)
OnAppPrivateCommand(String, Bundle)
OnBind(Intent)

把通訊頻道還給服務單位。

(繼承來源 AbstractInputMethodService)
OnBindInput()

當新客戶端綁定輸入法時才會被呼叫。

OnComputeInsets(InputMethodService+Insets)

把有趣的插入點計算進你的介面。

OnConfigurationChanged(Configuration)

當裝置設定變更時,系統會呼叫它,而你的元件正在運行。

(繼承來源 Service)
OnConfigureWindow(Window, Boolean, Boolean)

更新給定視窗的參數以符合該模式。

OnCreate()

系統在服務創建時呼叫。

(繼承來源 Service)
OnCreateCandidatesView()

建立並回傳用於顯示候選者的視圖階層。

OnCreateExtractTextView()

框架呼叫它來建立顯示擷取後文字的版面。

OnCreateInlineSuggestionsRequest(Bundle)

當自動填充要求 IME 時 InlineSuggestionsRequest ,我會打電話。

OnCreateInputMethodInterface()
已淘汰.

實作以返回我們的標準 InputMethodImpl

OnCreateInputMethodSessionInterface()
已淘汰.

實作以返回我們的標準 InputMethodSessionImpl

OnCreateInputView()

建立並回傳用於輸入區(例如軟性鍵盤)的視圖階層。

OnCurrentInputMethodSubtypeChanged(InputMethodSubtype)

當子類型改變時會被呼叫。

OnCustomImeSwitcherButtonRequestedVisible(Boolean)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

OnDestroy()

系統會打電話通知服務該服務已不再使用並被移除。

(繼承來源 Service)
OnDisplayCompletions(CompletionInfo[])

當應用程式回報希望顯示輸入法的自動補全候選時,會呼叫。

OnEvaluateFullscreenMode()

可以覆寫這個設定,來控制輸入法何時以全螢幕模式執行。

OnEvaluateInputViewShown()

此設定可覆蓋以控制軟輸入區域何時顯示給使用者。

OnExtractedCursorMovement(Int32, Int32)

當使用者在擷取的文字檢視中以全螢幕模式執行游標移動時,會呼叫此功能。

OnExtractedSelectionChanged(Int32, Int32)

當使用者在擷取文字檢視中移動游標時,會呼叫此功能,且在全閱讀模式下執行。

OnExtractedTextClicked()

當使用者在全螢幕模式下點擊擷取的文字檢視時,會呼叫此指令。

OnExtractingInputChanged(EditorInfo)

當目前顯示在擷取模式時,當前輸入目標改變時,這稱為「

OnExtractTextContextMenuItem(Int32)

當使用者在全螢幕模式下從擷取的文字檢視中選擇了右鍵選單項目時,會呼叫此功能。

OnFinishCandidatesView(Boolean)

當候選視圖被隱藏時呼叫。

OnFinishInput()

呼叫以通知輸入方法,文字輸入已在最後一個編輯器完成。

OnFinishInputView(Boolean)

當輸入視圖被隱藏時呼叫。

OnFinishStylusHandwriting()

當目前的觸控筆手寫工作結束時(系統或透過 #finishStylusHandwriting()) 呼叫。

OnGenericMotionEvent(MotionEvent)

實作這個來處理輸入法上的一般動態事件。

(繼承來源 AbstractInputMethodService)
OnInitializeInterface()

這是一個子類別可以用來初始化介面的鉤子。

OnInlineSuggestionsResponse(InlineSuggestionsResponse)

當自動填充回應包含 InlineSuggestionsResponse 內嵌建議時,會被呼叫。

OnKeyDown(Keycode, KeyEvent)

當 a KeyEvent 從目標應用程式轉發時會被回撥。

OnKeyLongPress(Keycode, KeyEvent)

預設實作 KeyEvent.Callback#onKeyLongPress(int, KeyEvent) KeyEvent.Callback.onKeyLongPress():總是回傳 false(不處理事件)。

OnKeyMultiple(Keycode, Int32, KeyEvent)

此限制覆寫以攔截特殊金鑰多重事件,避免應用程式處理。

OnKeyUp(Keycode, KeyEvent)

覆蓋此設定以攔截應用程式處理前的鍵點事件。

OnLowMemory()

當整體系統記憶體不足時,當正在執行的程序應該會修剪記憶體使用時,就會呼叫這個動作。

(繼承來源 Service)
OnPrepareStylusHandwriting()

被叫去準備筆寫字。

OnRebind(Intent)

當新客戶連接服務時,該服務在先前已被通知所有已斷線 #onUnbind後才撥打。

(繼承來源 Service)
OnShouldVerifyKeyEvent(KeyEvent)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 AbstractInputMethodService)
OnShowInputRequested(ShowFlags, Boolean)

系統決定可能是時候顯示你的輸入方式了。

OnStart(Intent, Int32)
已淘汰.

此會員已被棄用。

(繼承來源 Service)
OnStartCandidatesView(EditorInfo, Boolean)

當僅顯示候選人視圖時,會呼叫以顯示使用者透過硬鍵盤輸入文字的處理過程。

OnStartCommand(Intent, StartCommandFlags, Int32)

系統每次在用戶端明確啟動服務 android.content.Context#startService時呼叫 ,提供所提供的參數及代表啟動請求的唯一整數標記。

(繼承來源 Service)
OnStartConnectionlessStylusHandwriting(Int32, CursorAnchorInfo)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

OnStartInput(EditorInfo, Boolean)

呼叫以通知輸入方法文字輸入已在編輯器中開始。

OnStartInputView(EditorInfo, Boolean)

當輸入檢視正在顯示且輸入已開始在新編輯器上時呼叫。

OnStartStylusHandwriting()

當應用程式要求用觸控筆手寫 InputMethodManager#startStylusHandwriting(View)時會呼叫。

OnStylusHandwritingMotionEvent(MotionEvent)

每支觸控筆MotionEvent的回傳true#onStartStylusHandwriting()都會被叫回來。

OnTaskRemoved(Intent)

若服務目前正在執行,且使用者已移除來自該服務應用程式的任務,則會呼叫此服務。

(繼承來源 Service)
OnTimeout(Int32, ForegroundService)

當特定前景服務類型逾時時,回撥呼叫。

(繼承來源 Service)
OnTimeout(Int32)

回撥暫停。ServiceInfo#FOREGROUND_SERVICE_TYPE_SHORT_SERVICE

(繼承來源 Service)
OnTrackballEvent(MotionEvent)

實作這個功能來處理輸入法上的軌跡球事件。

(繼承來源 AbstractInputMethodService)
OnTrimMemory(TrimMemory)

當作業系統判斷程序是刪除其程序中不需要記憶體的好時機時,會被呼叫。

(繼承來源 Service)
OnUnbind(Intent)

當所有用戶端都已從服務發布的特定介面斷線時呼叫。

(繼承來源 Service)
OnUnbindInput()

當先前綁定的用戶端不再與輸入法相關聯時,會被呼叫。

OnUpdateCursor(Rect)
已淘汰.

當應用程式回報文字游標的新位置時,會被呼叫。

OnUpdateCursorAnchorInfo(CursorAnchorInfo)

當應用程式回報其文字插入點及組合字串中字元的新位置時,會被呼叫。

OnUpdateEditorToolType(MotionEventToolType)

當使用者點擊或點擊 android.widget.Editor.

OnUpdateExtractedText(Int32, ExtractedText)

當應用程式報告因當前文字狀態變更而顯示新擷取的文字時,會呼叫。

OnUpdateExtractingViews(EditorInfo)

當全螢幕模式擷取編輯器資訊變更時,會呼叫以更新其使用者介面狀態,例如顯示的動作按鈕。

OnUpdateExtractingVisibility(EditorInfo)

當全螢幕模式的擷取編輯器資訊改變時,會呼叫以判斷是否應該顯示 UI 中擷取(擷取文字與候選)部分。

OnUpdateSelection(Int32, Int32, Int32, Int32, Int32, Int32)

當應用程式回報文字新增選取區域時,會被呼叫。

OnViewClicked(Boolean)

當使用者點擊或點擊文字檢視時,會被呼叫。

OnWindowHidden()

當輸入法視窗在先前可見後被隱藏時,會被呼叫。

OnWindowShown()

在輸入法視窗顯示給使用者之前立即呼叫。

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)

在 Context 的基礎應用程式中新增 ComponentCallbacks 一個新應用程式,該應用程式會與 ComponentCallbacks 活動及其他元件方法的呼叫同時被呼叫。

(繼承來源 Context)
RegisterDeviceIdChangeListener(IExecutor, IIntConsumer)

新增一個裝置 ID,變更監聽器到 Context,當系統更改裝置關聯時會呼叫。

(繼承來源 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags)
已淘汰.

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags)
已淘汰.

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler)

註冊以接收意圖廣播,並在 var>排程器</var> 的情境<下執行。

(繼承來源 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter)

註冊一個廣播接收器(BroadcastReceiver)以便在主活動執行緒中執行。

(繼承來源 ContextWrapper)
RemoveStickyBroadcast(Intent)
已淘汰.
(繼承來源 ContextWrapper)
RemoveStickyBroadcastAsUser(Intent, UserHandle)
已淘汰.
(繼承來源 ContextWrapper)
RequestHideSelf(HideSoftInputFlags)

關閉此輸入法的軟輸入區,將其從顯示器中移除。

RequestShowSelf(ShowFlags)

顯示輸入法的軟輸入區域,讓使用者能看到輸入法視窗並互動。

RevokeSelfPermissionOnKill(String)

觸發執行時權限的非同步撤銷。

(繼承來源 Context)
RevokeSelfPermissionsOnKill(ICollection<String>)

會觸發撤銷呼叫套件一個或多個權限。

(繼承來源 Context)
RevokeUriPermission(String, Uri, ActivityFlags)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
RevokeUriPermission(Uri, ActivityFlags)

移除先前在 中新增的所有存取特定內容提供者 Uri 的權限。

(繼承來源 ContextWrapper)
SendBroadcast(Intent, String, Bundle)

將該意圖廣播給所有有興趣的廣播接收器,並允許執行可選的必要許可。

(繼承來源 Context)
SendBroadcast(Intent, String)

將該意圖廣播給所有有興趣的廣播接收器,並允許執行可選的必要許可。

(繼承來源 ContextWrapper)
SendBroadcast(Intent)

將該意圖廣播給所有有興趣的廣播接收器。

(繼承來源 ContextWrapper)
SendBroadcastAsUser(Intent, UserHandle, String)

那個版本 SendBroadcast(Intent, String) 允許你指定廣播要傳送給哪個使用者。

(繼承來源 ContextWrapper)
SendBroadcastAsUser(Intent, UserHandle)

那個版本 SendBroadcast(Intent) 允許你指定廣播要傳送給哪個使用者。

(繼承來源 ContextWrapper)
SendBroadcastWithMultiplePermissions(Intent, String[])

將該意圖廣播給所有有興趣的廣播接收器,允許執行一系列必要的權限。

(繼承來源 Context)
SendDefaultEditorAction(Boolean)

請輸入目標透過 執行其預設動作 InputConnection#performEditorAction InputConnection.performEditorAction()

SendDownUpKeyEvents(Keycode)

將給定的金鑰事件碼(由 定義 KeyEvent)傳送到目前輸入連線,是鍵下降 + 鍵上行事件對。

SendKeyChar(Char)

將指定的 UTF-16 字元傳送到目前的輸入連線。

SendOrderedBroadcast(Intent, Int32, String, String, BroadcastReceiver, Handler, String, Bundle, Bundle)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 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)

將所定意圖廣播給所有有興趣的廣播接收器,一次一個傳送,讓更多優先接收者先消化該廣播,然後再傳送給較不偏好的接收器。

(繼承來源 Context)
SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle)

那個版本 #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle) 允許你指定應用程式操作,來強制限制廣播將傳送到哪些接收器。

(繼承來源 Context)
SendOrderedBroadcast(Intent, String)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 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)
SetCandidatesView(View)

以新的觀點取代現有候選人的觀點。

SetCandidatesViewShown(Boolean)

控制候選人展示區域的可見性。

SetExtractView(View)
SetForeground(Boolean)

此會員已被棄用。

(繼承來源 Service)
SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
SetInputView(View)

將目前的輸入視圖替換成新的。

SetStylusHandwritingRegion(Region)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

SetTheme(Int32)

為這個情境設定基本主題。

(繼承來源 ContextWrapper)
SetWallpaper(Bitmap)
已淘汰.
(繼承來源 ContextWrapper)
SetWallpaper(Stream)
已淘汰.
(繼承來源 ContextWrapper)
ShouldOfferSwitchingToNextInputMethod()

如果目前的 IME 需要提供使用者切換到下一個輸入法的方法(例如

ShowStatusIcon(Int32)
ShowWindow(Boolean)
StartActivities(Intent[], Bundle)

啟動多項新活動。

(繼承來源 ContextWrapper)
StartActivities(Intent[])

就像 StartActivities(Intent[], Bundle) 沒有指定選項一樣。

(繼承來源 ContextWrapper)
StartActivity(Intent, Bundle)

啟動一項新活動。

(繼承來源 ContextWrapper)
StartActivity(Intent)

就像 StartActivity(Intent, Bundle) 沒有指定選項一樣。

(繼承來源 ContextWrapper)
StartActivity(Type)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Context)
StartForeground(Int32, Notification, ForegroundService)

一個超載版本, #startForeground(int, Notification) 並增加了 foregroundServiceType 參數。

(繼承來源 Service)
StartForeground(Int32, Notification)

如果你的服務已經啟動(透過 Context#startService(Intent)),也讓這個服務在前景運行,並在此狀態下向使用者顯示正在進行的通知。

(繼承來源 Service)
StartForegroundService(Intent)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
StartInstrumentation(ComponentName, String, Bundle)

開始執行一個 Instrumentation 類別。

(繼承來源 ContextWrapper)
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle)

StartActivity(Intent, Bundle)是,但一開始就用一個意圖發送者。

(繼承來源 ContextWrapper)
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 ContextWrapper)
StartService(Intent)

請求啟動某項應用程式服務。

(繼承來源 ContextWrapper)
StopForeground(Boolean)

舊版的 #stopForeground(int)

(繼承來源 Service)
StopForeground(StopForegroundFlags)

將此服務從前景狀態移除,若需要更多記憶體,便可終止。

(繼承來源 Service)
StopSelf()

如果服務已經開始,請停止。

(繼承來源 Service)
StopSelf(Int32)

舊版本 #stopSelfResult 不會回傳結果。

(繼承來源 Service)
StopSelfResult(Int32)

如果最近一次啟動 <是 var>startId</var>,請停止服務。

(繼承來源 Service)
StopService(Intent)

請求停止某項應用程式服務。

(繼承來源 ContextWrapper)
SwitchInputMethod(String, InputMethodSubtype)

強制切換到新的輸入方式,該輸入法由 id標示為 。

SwitchInputMethod(String)

強制切換到以 <var>id</var> 識別的新輸入方式。

SwitchToNextInputMethod(Boolean)

強制切換到下一個輸入方式和子類型。

SwitchToPreviousInputMethod()

強制切換到最後使用的輸入法和子類型。

ToArray<T>()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
ToString()

回傳物件的字串表示。

(繼承來源 Object)
UnbindService(IServiceConnection)

斷開應用程式服務。

(繼承來源 ContextWrapper)
UnregisterComponentCallbacks(IComponentCallbacks)

移除 ComponentCallbacks 先前註冊於 #registerComponentCallbacks(ComponentCallbacks)的物件。

(繼承來源 Context)
UnregisterDeviceIdChangeListener(IIntConsumer)

移除一個裝置 ID,變更了 Context 中的監聽者。

(繼承來源 Context)
UnregisterFromRuntime()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
UnregisterReceiver(BroadcastReceiver)

取消註冊先前註冊的廣播接收器。

(繼承來源 ContextWrapper)
UpdateFullscreenMode()

重新評估輸入法是否應該以全螢幕模式運行,並更新其介面(如果自上次評估以來有變動)。

UpdateInputViewShown()

重新評估軟輸入區域是否應該顯示,並更新其介面是否自上次評估以來有變化。

UpdateServiceGroup(IServiceConnection, Int32, Int32)

對於先前綁定於 #bindService 或相關方法的服務,改變系統管理該服務程序與其他程序之間的方式。

(繼承來源 Context)
Wait()

導致目前執行緒等待被喚醒,通常是透過 <em>通知</><em 或 em>中斷</em> 來喚醒。

(繼承來源 Object)
Wait(Int64, Int32)

會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。

(繼承來源 Object)
Wait(Int64)

會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。

(繼承來源 Object)

明確介面實作

名稱 Description
IJavaPeerable.Disposed()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
IJavaPeerable.DisposeUnlessReferenced()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
IJavaPeerable.Finalized()

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
IJavaPeerable.JniManagedPeerState

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

(繼承來源 Object)

擴充方法

名稱 Description
GetJniTypeName(IJavaPeerable)

取得實例 self類型的 JNI 名稱。

JavaAs<TResult>(IJavaPeerable)

試著強制self輸入 TResult,檢查 強制在 Java 端是否有效。

JavaCast<TResult>(IJavaObject)

執行 Android 執行時檢查型別轉換。

JavaCast<TResult>(IJavaObject)

InputMethodService 提供標準的 InputMethod 實作,最終實作可從此衍生並自訂。

TryJavaCast<TResult>(IJavaPeerable, TResult)

試著強制self輸入 TResult,檢查 強制在 Java 端是否有效。

適用於