ContextWrapper 類別

定義

代理實作的上下文,將所有呼叫委派給另一個上下文。

[Android.Runtime.Register("android/content/ContextWrapper", DoNotGenerateAcw=true)]
public class ContextWrapper : Android.Content.Context
[<Android.Runtime.Register("android/content/ContextWrapper", DoNotGenerateAcw=true)>]
type ContextWrapper = class
    inherit Context
繼承
ContextWrapper
衍生
屬性

備註

代理實作的上下文,將所有呼叫委派給另一個上下文。 可以子類別以修改行為,而不改變原始上下文。

Java 文件 android.content.ContextWrapper

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

建構函式

名稱 Description
ContextWrapper(Context)
ContextWrapper(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)
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
ApplicationContext

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

ApplicationInfo

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

Assets

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

AttributionSource

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Context)
AttributionTag

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

(繼承來源 Context)
BaseContext
CacheDir

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

Class

回傳此 Object的執行時類別。

(繼承來源 Object)
ClassLoader

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

CodeCacheDir

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

ContentResolver

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

DataDir

代理實作的上下文,將所有呼叫委派給另一個上下文。

DeviceId

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

(繼承來源 Context)
Display

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

(繼承來源 Context)
ExternalCacheDir

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

FilesDir

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

Handle

底層 Android 實例的帳號。

(繼承來源 Object)
IsDeviceProtectedStorage

代理實作的上下文,將所有呼叫委派給另一個上下文。

IsRestricted

表示此上下文是否受限。

(繼承來源 Context)
IsUiContext

如果上下文是可存取 、 或 android.app.WallpaperManager WallpaperManagerandroid.view.LayoutInflater LayoutInflater 等 UI 元件的 UI 上下文WindowManager,則回傳 true

(繼承來源 Context)
JniIdentityHashCode

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
JniPeerMembers

代理實作的上下文,將所有呼叫委派給另一個上下文。

MainExecutor

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

(繼承來源 Context)
MainLooper

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

NoBackupFilesDir

回傳檔案系統目錄的絕對路徑,類似 FilesDir

ObbDir

回傳該應用程式的 OBB 檔案(若有)可找到的主要外部儲存目錄。

OpPackageName

回傳這個上下文中應該用於 android.app.AppOpsManager 呼叫的套件名稱,這樣應用程式運維管理員的 UID 驗證就能用這個名稱。

(繼承來源 Context)
PackageCodePath

回傳完整路徑至此情境的主要 Android 套件。

PackageManager

回傳 PackageManager 實例以查找全域套件資訊。

PackageName

回傳這個應用程式的套件名稱。

PackageResourcePath

回傳完整路徑至此情境的主要 Android 套件。

Params

回傳該上下文所用的參數集合,若是透過 #createContext(ContextParams)建立。

(繼承來源 Context)
PeerReference

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
Resources

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

Theme

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

ThresholdClass

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

ThresholdType

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

Wallpaper
WallpaperDesiredMinimumHeight
WallpaperDesiredMinimumWidth

方法

名稱 Description
AttachBaseContext(Context)

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

BindIsolatedService(Intent, Context+BindServiceFlags, String, IExecutor, IServiceConnection)

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

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

BindService(Intent, IServiceConnection, Context+BindServiceFlags)

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

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

(繼承來源 Context)
CheckCallingOrSelfPermission(String)

確認是IPC的通話流程 還是您 獲得了特定權限。

CheckCallingOrSelfUriPermission(Uri, ActivityFlags)

確認 IPC 的通話流程或 是否已獲得存取特定 URI 的權限。

CheckCallingOrSelfUriPermissions(IList<Uri>, Int32)

確認 IPC <em>或 you</em> 的呼叫過程是否已被授權存取 URI 清單。

(繼承來源 Context)
CheckCallingPermission(String)

確認你所處理的 IPC 的通話流程是否已獲得特定權限。

CheckCallingUriPermission(Uri, ActivityFlags)

確認呼叫程序及使用者 ID 是否已獲得存取特定 URI 的權限。

CheckCallingUriPermissions(IList<Uri>, Int32)

確認呼叫程序與 UID 是否已獲得存取 URI 清單的權限。

(繼承來源 Context)
CheckContentUriPermissionFull(Uri, Int32, Int32, ActivityFlags)

確認某個程序和 UID 是否已被授權存取特定內容 URI。

(繼承來源 Context)
CheckPermission(String, Int32, Int32)

判斷該權限是否允許用於系統中執行的特定程序及使用者 ID。

CheckSelfPermission(String)

代理實作的上下文,將所有呼叫委派給另一個上下文。

CheckUriPermission(Uri, Int32, Int32, ActivityFlags)

判斷特定程序及使用者 ID 是否已被授權存取特定 URI。

CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags)

檢查 Uri 和一般權限。

CheckUriPermissions(IList<Uri>, Int32, Int32, Int32)

確認某個程序與 UID 是否已被授權存取 URI 清單。

(繼承來源 Context)
ClearWallpaper()
Clone()

建立並回傳此物件的副本。

(繼承來源 Object)
CreateAttributionContext(String)

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

(繼承來源 Context)
CreateConfigurationContext(Configuration)

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

CreateContext(ContextParams)

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

(繼承來源 Context)
CreateContextForSplit(String)

代理實作的上下文,將所有呼叫委派給另一個上下文。

CreateDeviceContext(Int32)

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

(繼承來源 Context)
CreateDeviceProtectedStorageContext()

代理實作的上下文,將所有呼叫委派給另一個上下文。

CreateDisplayContext(Display)

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

CreatePackageContext(String, PackageContextFlags)

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

CreateWindowContext(Display, Int32, Bundle)

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

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

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

(繼承來源 Context)
DatabaseList()

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

DeleteDatabase(String)

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

DeleteFile(String)

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

DeleteSharedPreferences(String)

代理實作的上下文,將所有呼叫委派給另一個上下文。

Dispose()

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
Dispose(Boolean)

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
EnforceCallingOrSelfPermission(String, String)

如果你或你正在處理的 IPC 呼叫程序都沒有獲得特定權限,請拋出 SecurityException

EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String)

如果 IPC 或 你的 呼叫程序尚未被授權存取特定 URI,請拋出 SecurityException

EnforceCallingPermission(String, String)

如果你正在處理的 IPC 呼叫程序尚未獲得特定權限,請拋出 SecurityException

EnforceCallingUriPermission(Uri, ActivityFlags, String)

如果呼叫程序和使用者 ID 尚未被授權存取特定 URI,請拋出 SecurityException

EnforcePermission(String, Int32, Int32, String)

如果系統中執行的特定程序和使用者 ID 不允許該權限,請拋出 SecurityException

EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String)

如果某個程序和使用者 ID 尚未被授權存取特定 URI,請拋出 SecurityException

EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String)

同時執行 Uri 和一般授權。

Equals(Object)

表示是否有其他物體「等同」於此物。

(繼承來源 Object)
FileList()

回傳一個字串陣列,命名與該上下文應用套件相關的私有檔案。

GetColor(Int32)

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

(繼承來源 Context)
GetColorStateList(Int32)

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

(繼承來源 Context)
GetDatabasePath(String)

代理實作的上下文,將所有呼叫委派給另一個上下文。

GetDir(String, FileCreationMode)

擷取並建立一個新的目錄,應用程式可以放置自己的自訂資料檔案。

GetDrawable(Int32)

回傳一個可繪製的物件,與特定資源 ID 相關聯,並依當前主題做樣式。

(繼承來源 Context)
GetExternalCacheDirs()

回傳所有外部儲存裝置上應用程式專屬目錄的絕對路徑,該應用程式可放置其擁有的快取檔案。

GetExternalFilesDir(String)

回傳主外部檔案系統目錄的絕對路徑(該 ExternalStorageDirectory位址位於 ),該應用程式可放置其擁有的持久檔案。

GetExternalFilesDirs(String)

回傳所有外部儲存裝置上應用程式專屬目錄的絕對路徑,該應用程式可放置其擁有的持久檔案。

GetExternalMediaDirs()
已淘汰.

回傳所有外部儲存裝置上應用程式專屬目錄的絕對路徑,該應用程式可在此放置媒體檔案。

GetFileStreamPath(String)

回傳檔案系統中建立檔案的絕對路徑,該檔案存放於該 OpenFileOutput(String, FileCreationMode) 檔案中。

GetHashCode()

回傳物件的雜湊碼值。

(繼承來源 Object)
GetObbDirs()

回傳所有外部儲存裝置上應用程式專屬目錄的絕對路徑,該目錄中可找到應用程式的 OBB 檔案(若有)。

GetSharedPreferences(String, FileCreationMode)

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

GetString(Int32, Object[])

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

(繼承來源 Context)
GetString(Int32)

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

(繼承來源 Context)
GetSystemService(Class)

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

(繼承來源 Context)
GetSystemService(String)

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

GetSystemServiceName(Class)

代理實作的上下文,將所有呼叫委派給另一個上下文。

GetText(Int32)

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

(繼承來源 Context)
GetTextFormatted(Int32)

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

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

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

JavaFinalize()

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

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

MoveSharedPreferencesFrom(Context, String)

代理實作的上下文,將所有呼叫委派給另一個上下文。

Notify()

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

(繼承來源 Object)
NotifyAll()

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

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

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

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

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

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

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

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

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

(繼承來源 Context)
OpenFileInput(String)

開啟與此上下文應用程式套件相關的私人檔案以進行閱讀。

OpenFileOutput(String, FileCreationMode)

開啟與此上下文應用程式套件相關的私有檔案以進行撰寫。

OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler)

開啟與此上下文應用程式套件相關的新私有 SQLiteDatabase。

OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory)

開啟與此上下文應用程式套件相關的新私有 SQLiteDatabase。

PeekWallpaper()
RegisterComponentCallbacks(IComponentCallbacks)

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

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

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

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags)

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags)

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

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

RegisterReceiver(BroadcastReceiver, IntentFilter)

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

RemoveStickyBroadcast(Intent)
RemoveStickyBroadcastAsUser(Intent, UserHandle)
RevokeSelfPermissionOnKill(String)

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

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

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

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

RevokeUriPermission(Uri, ActivityFlags)

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

SendBroadcast(Intent, String, Bundle)

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

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

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

SendBroadcast(Intent)

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

SendBroadcastAsUser(Intent, UserHandle, String)

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

SendBroadcastAsUser(Intent, UserHandle)

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

SendBroadcastWithMultiplePermissions(Intent, String[])

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

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

那個版本 SendBroadcast(Intent) 允許你從廣播中接收回來的資料。

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)

代理實作的上下文,將所有呼叫委派給另一個上下文。

SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle)

代理實作的上下文,將所有呼叫委派給另一個上下文。

SendStickyBroadcast(Intent, Bundle)

執行 #sendBroadcast(Intent) 一個「黏性」的行為,意即你傳送的意圖會在廣播完成後仍保留,讓其他人能透過回傳值 #registerReceiver(BroadcastReceiver, IntentFilter)快速取得該資料。

(繼承來源 Context)
SendStickyBroadcast(Intent)
已淘汰.

執行 #sendBroadcast(Intent) 一個「黏性」的行為,意即你傳送的意圖會在廣播完成後仍保留,讓其他人能透過回傳值 #registerReceiver(BroadcastReceiver, IntentFilter)快速取得該資料。

SendStickyBroadcastAsUser(Intent, UserHandle)
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle)
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle)
SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
SetTheme(Int32)

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

SetWallpaper(Bitmap)
SetWallpaper(Stream)
StartActivities(Intent[], Bundle)

啟動多項新活動。

StartActivities(Intent[])

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

StartActivity(Intent, Bundle)

啟動一項新活動。

StartActivity(Intent)

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

StartActivity(Type)

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Context)
StartForegroundService(Intent)

代理實作的上下文,將所有呼叫委派給另一個上下文。

StartInstrumentation(ComponentName, String, Bundle)

開始執行一個 Instrumentation 類別。

StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle)

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

StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32)

代理實作的上下文,將所有呼叫委派給另一個上下文。

StartService(Intent)

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

StopService(Intent)

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

ToArray<T>()

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
ToString()

回傳物件的字串表示。

(繼承來源 Object)
UnbindService(IServiceConnection)

斷開應用程式服務。

UnregisterComponentCallbacks(IComponentCallbacks)

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

(繼承來源 Context)
UnregisterDeviceIdChangeListener(IIntConsumer)

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

(繼承來源 Context)
UnregisterFromRuntime()

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
UnregisterReceiver(BroadcastReceiver)

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

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)
IJavaPeerable.JniManagedPeerState

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

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

代理實作的上下文,將所有呼叫委派給另一個上下文。

(繼承來源 Object)

擴充方法

名稱 Description
GetJniTypeName(IJavaPeerable)

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

JavaAs<TResult>(IJavaPeerable)

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

JavaCast<TResult>(IJavaObject)

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

JavaCast<TResult>(IJavaObject)

代理實作的上下文,將所有呼叫委派給另一個上下文。

TryJavaCast<TResult>(IJavaPeerable, TResult)

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

適用於